Hi Laurent

No apologies please, your input did guide me in the right direction.

The structure of my application was some kind of workaround of the problem 
where NavigationController cannot be loaded from a nib, at least not like the 
other type of controllers due to the fact that this guy creates its view 
dynamically. 
So instead of using a plain controller that has no "child" support, I took the 
UITabBarController, inserted my graphical view as its first item and configured 
the navigator with my custom controllers and guess what, gone the orientation 
problem.

The problem lies somewhere in the framework. I tested my application yesterday 
on iOS4 and again a surprise, the orientation shift is transmitted by only 
after the view finishes its apparition on screen.

Thank you both Matt and Laurent for your help.

Eric.



On 2010-07-26, at 17:05, Laurent Daudelin wrote:

> 
> 
> On Jul 26, 2010, at 13:33, Matt Neuburg wrote:
> 
>> On Mon, 26 Jul 2010 10:03:14 -0400, Eric Giguere <eric.gigu...@videotron.ca>
>> said:
>>> Hi Matt
>>> 
>>> Thanks for the advice.
>>> 
>>> So, if I got it right, I have to remove the second controller from my main
>> window nib file and put it elsewhere. Otherwise, it gets created at the same
>> time as the other. I did that to go around a problem with the Navigation
>> Controller. This guy doesn't get loaded when you put it alone in a nib and 
>> then
>> initialize it by loading the nib file. Pretty strange...
>>> 
>>> So, with your suggestion, I should keep the navigator interface with the 
>>> main
>> xib and create / release the other view when needed.
>>> 
>>> Got you right?
>> 
>> I don't see why what you're describing has anything to do with what I said.
>> My advice was about the window's primary subview. If that's controlled by a
>> navigation controller in your app, then it is that navigation controller
>> that I'm suggesting you would need to worry about. m.
>> 
>>> On 2010-07-25, at 15:39, Matt Neuburg wrote:
>>> 
>>>>> Everywhere, it is said that it should be handled automatically when adding
>> the
>>>> subview to the window but it doesn't seem to work, at least not with my
>>>> controller layout.
>>>> 
>>>> My experience is that you have to wait until the window's primary subview
>>>> has itself rotated before you do any further interface configuration. I add
>>>> code like this to my main subview's controller:
>>>> 
>>>> - (void)didRotateFromInterfaceOrientation:
>>>>      (UIInterfaceOrientation)fromInterfaceOrientation {
>>>>  if (!didInitialSetup) { // once, at startup: set up interface
>>>>      didInitialSetup = YES;
>>>>      [self setUpInterface];
>>>>  }
>>>> }
>>>> 
>>>> That way I don't create the nested interface until the main view has 
>>>> settled
>>>> down into its initial rotation. Otherwise, if I do things too soon, x and y
>>>> are reversed and everything is wonky after that. This trick has really
>>>> helped me with autorotation, though I don't know if it will be useful in
>>>> your case.
>>>> 
>>>> m.
>>>> 
>> 
> 
> It's a little hard to see what the original poster's problem is, so maybe my 
> message is irrelevant, but as far as orientation is concerned, I don't think 
> having the controllers all in the same xib is the problem because I do it in 
> a couple of apps.
> 
> My latest app is a tab bar-based app. Each tab item brings a navigation-based 
> view which contains a UITableView. The key is to make sure you subclass all 
> the controllers in the view hierarchy, starting with the tab bar view 
> controller all the way down to the UITableViewController so that they can all 
> return YES to the shouldAutorotateToInterfaceOrientation:.
> 
> My MainWindow.xib file has the layout of the tab bar view with a custom 
> navigation controller for each tab bar item. Of course, each UITableView is 
> loaded from a different xib but it all works fine.
> 
> If I missed something, I apologize.
> 
> -Laurent.
> -- 
> Laurent Daudelin
> AIM/iChat/Skype:LaurentDaudelin                               
> http://www.nemesys-soft.com/
> Logiciels Nemesys Software                                            
> laur...@nemesys-soft.com

Eric Giguere
eric.gigu...@videotron.ca



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to