Question: do I need to have different images for different screen sizes for iOS for (4s 5s, and above)?
how can we set retain dimensions of images/Icons and controls across the screen sizes and resolutions in iOS (using Xamarin forms).
please refer this to understand problem 
[Autolayout and proportional positioning](https://stackoverflow.com/questions/20192907/autolayout-and-proportional-positioning?rq=1)

but I need solution for xamarin forms.

Answer: 
Define virtual property like this:

```
/// <summary>
/// name: Building
/// </summary>
public class Building
{
    /// <summary>
    /// name of building
    /// </summary>
    public virtual string Name
    {
        get
        {
            // default name is class name with spaces between upper letters
            StringBuilder sb = new StringBuilder();
            bool wasUpper = false;
            foreach (char c in this.GetType().Name)
            {
                if (char.IsUpper(c))
                {
                    if (!wasUpper)
                    {
                        sb.Append(' ');
                        wasUpper = true;
                    }
                }
                else
                {
                    wasUpper = false;
                }
                sb.Append(c);
            }
            return sb.ToString().Trim();
        }
    }

    public void Construct()
    {
        string buildingName = this.Name;
        // do some work
    }
}

/// <summary>
/// name: Missile Station
/// </summary>
public class MissileStation : Building { }

/// <summary>
/// name: Radar Station "Buk"
/// </summary>
public class RadarBuk : Building
{
    /// <summary>
    /// overriden building name
    /// </summary>
    public override string Name { get { return @"Radar Station ""Buk"""; } }
}

```
Here is an approach with `Attributes`:

```
[AttributeUsage(AttributeTargets.Class)]
public class NameAttribute : Attribute {
    public readonly string Name;

    public NameAttribute(string name) {
        this.Name = name;
    }
}

public static class Extensions {
    /// <summary>
    /// If existant, returns the name tag for given object, else null
    /// </summary>
    public static string GetNameTag(this object instance) {
        return instance.GetType().GetNameTag();
    }

    /// <summary>
    /// If existant, returns the name tag for given type, else null
    /// </summary>
    public static string GetNameTag(this Type type) {
        object[] names = type.GetCustomAttributes(typeof(NameAttribute), false);
        switch(names.Length) {
            case 0:
                return null;
            case 1:
                return ((NameAttribute)names[0]).Name;
            default:
                throw new FormatException();
        }
    }
}

[Name("Headquater")]
public class Headquater : Building {
    // ...
}

[Name("Solar Panel")]
public class Solarpanel : Building {
    // ...
}

```

Now, you can simply do:

```
object panel = new SolarPanel();
Console.WriteLine(panel.GetNameTag());

```

And:

```
Console.WriteLine(typeof(SolarPanel).GetNameTag());

```