user7155952
user7155952

Reputation:

Constraint bug in xcode

I have a view that it has 4 constraint:

enter image description here

it works fine but when I change view as in storyboard to another device (e.g Iphone 4s) but I build for Iphone 6 it changes to this: enter image description here enter image description here

and the weird part is when I change the view as to Iphone6 it works fine:

this screen shot is when I change my storyboard view as to iphone 6

enter image description here enter image description here

Upvotes: 1

Views: 130

Answers (1)

Ishika
Ishika

Reputation: 2205

Try to set the frame of your UIView in your viewDidLoad() method as

view.frame = CGRectMake(0, 70, self.view.frame.size.width, self.view.frame.size.height-70)

70 is a static value of your header placed above your view that you can change according to your view.

Upvotes: 1

Related Questions