ios - Size of a ViewController Containers UIView -
i have viewcontroller container 400 high on iphone5. when use on iphone4 squashes view everything. in case want view appear same size on phones.
vc.h
@property (strong, nonatomic) iboutlet uiview *viewforcontainer;
vc.m
@synthesize viewforcontainer - (void)viewdidload { [super viewdidload]; cgrect rect = [viewforcontainer frame]; rect.size.height = 400; [viewforcontainer setframe:rect]; }
why can't force height this? .. going have make new storyboard it?
short answer:
select view , choose editor > pin > height. rid of unnecessary bottom constraint.
long answer:
you should stop you're doing , understand you're doing - in particular, autolayout. it's everywhere, default, whether or not, 1 may know it.
Comments
Post a Comment