Question

I have a UIWebView in my app. Due to the differences between iOS 6 and iOS 7, it has be a slightly different size. I'm trying to achieve this with iOS 6/7 deltas in IB. It seems like this should be easy, but it's not working right. On iOS 6, the UIWebView needs to have a height of 373 and on iOS 7 it needs to have a height of 393. However, when I set the height in iOS 6/7 deltas, it's fine on iOS 7 but when it's run on iOS 6 the UIWebView's height increases to 745. That is way too big. I've also had this problem the other way around (where it's fine on iOS 6 but way to big on iOS 7). I can't figure out why this is happening. Does it have something to do with the way iOS 6/7 deltas work? Is there another solution?

Here are my deltas:

With "View as iOS 6.1 and Earlier" enabled:

With

With "View as iOS 7.0 and Later" enabled:

With

Also something I should have mentioned before is I'm not using Autolayout as I want to maintain compatibility with iOS 4.3.

Was it helpful?

Solution

You are misunderstanding how deltas work.

"Delta" means the "difference", as you have used when setting the y value. If the views have the same height, simply set the delta of the height to 0. If the height is different, set the delta to the difference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top