iOs: Programmatically change the ratio of a UILabel in Swift -


i want change programmatically ratio of uilabel have adapted between devices (iphone 4, 5, 6, ipad), because can't on storyboard:

enter image description here

    if devicetype.is_iphone_4_or_less {     } else if devicetype.is_iphone_5 {     } else if devicetype.is_iphone_6 {     } else if devicetype.is_iphone_6p {     } else if uidevice.currentdevice().userinterfaceidiom == .pad {     } 

the multiplier property (the ratio) readonly. should add support size classes in constraints pressing + sign beside installed check box. thus, can specify different constraints different size classes.

enter image description here


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -