Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

theprizerevealed

macrumors regular
Original poster
Feb 26, 2016
183
12
hello,

I want to know if you change the size and aspect ratio of a UIView according to device type. For example, is there some way to make the size and shape of a UIView appear different for the ipad devices than the iphone devices?
 

xStep

macrumors 68020
Jan 28, 2003
2,031
143
Less lost in L.A.
Autolayout.

UIViewController subclasses can use viewWillLayoutSubviews() and viewDidLayoutSubviews() and updateViewConstraints().

layoutSubviews() in your view subclass.

Be more descriptive of your desired end result and people can be more helpful.
 
  • Like
Reactions: Amazing Iceman
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.