Reputation: 177
I have an xib file and I want my green UIView to change its height according to Device, but whenever I want to get it height with methods
[self.tablePlaceView frame];
[self.tablePlaceView bounds];
it returns {{0, 0}, {320, 568}} on all Devices, but on previews and device it does everything right.
Upvotes: 0
Views: 446
Reputation: 1033
by default your view get its size from your NIB file. after constraints take action, you'll be able to see the real frame in viewDidAppear: method
Upvotes: 1