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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -