On 25 Sep 2013, at 17:44, David Duncan <david.dun...@apple.com> wrote:

> On Sep 21, 2013, at 5:14 AM, Dave <d...@looktowindward.com> wrote:
> 
>> On 20 Sep 2013, at 20:41, David Duncan <david.dun...@apple.com> wrote:
>> 
>>> If you are building with the iOS 7 SDK, wantsFullScreenLayout should not be 
>>> consulted for your UI layout at all by the framework. The only thing I can 
>>> imagine the original engineer wanted was to avoid having to set the flag to 
>>> NO manually, and thus have it done automatically.
>> 
>> It's because another part of the code relies on it for laying out its view. 
>> Is the effect of  wantsFullScreenLayout in iOS 6 described in detail 
>> somewhere? The best approach would to adapt the code to work on any iOS 
>> Version (well, 5, 6 and 7 in this case) without fiddling with 
>> wantsFullScreenLayout is this is possible?
> 
> wantsFullScreenLayout is generally a flag to request that your view 
> controller’s view be laid out underneath translucent elements (such as a 
> translucent navigation bar or status bar). In practice its behavior is 
> somewhat confusing and a bit arbitrary.
> 
> Keep in mind that rather than overriding the getter, it would be simpler to 
> just set the value as you desire in your view controller’s -init* methods.

This code was already there, I probably would have used the init method if I 
had written it, but, as it happens it works out well, since iOS 7 doesn't use 
(so therefore it never calls the getter or the setter) wantsFullScreenLayout, I 
do not need to check the version in these methods, so it is better 
compatibility wise, although, I doubt it was planned!

>> 
>>> Of course even if you build with the iOS 7 SDK and deploy to iOS 6, the 
>>> flag will be honored there as specified.
>>> 
>> 
>> Ultimately we want to use some iOS 7 features so it needs to be fixed in iOS 
>> 7, I'm wondering how much of a change it will be and if it's worth rewriting 
>> it so will work on 5 6 and 7.
> 
> 
> As noted, UIKit doesn’t look at the wantsFullScreenLayout property with 
> applications linked on the iOS 7 SDK, instead using edgesForExtendedLayout. 
> The default value of that property is the equivalent of 
> wantsFullScreenLayout=YES, and you should be able to set 
> edgesForExtendedLayout to RectEdgesNone to get a similar effect to NO.

Yes, fixed it now, it's annoying that it is defaulted YES or that XCode 5/IB 
sets to YES. I had to go through 35+ VCs setting the RectEdgesNone flags to NO.

IMO, the "good" thing to do would if loading a Storyboard/NIB generated by an 
older version of XCode, would be to default those items to NO. For new VCs 
being created, set it to YES.

Thanks for the help.
Dave


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to