Matt that worked out perfectly!

instead of 
[self.window addSubview:pButton];

changed it to 
[self.tabBarController.view addSubview:pButton];

Coordinates and orientation are now right in the spot ... thank you !!!
Sandro.

On 2010-10-28, at 3:54 PM, Matt Neuburg wrote:

> On Thu, 28 Oct 2010 14:10:28 -0400, Sandro No?l <[email protected]> 
> said:
> >Greetings.
> >
> >I am trying to draw a UIButton in the application's main window so the 
> >button remains visible no matter what the user does in the sub view's.
> >(TabBar based with a bunch of NavBars.)...
> >
> >This works great in the default device orientation.
> >
> >But left, right and upside down, the orientation of the button remains as if 
> >it was upright.
> >I've tried adjusting the coordinates but the image drawn inside the button 
> >does not change orientation.
> >when the phone is upside down, the image is upside down but the rest of the 
> >interface is well positioned.
> >
> >I'm sure the trick is simple but I can't seem to find it in google, or i'm 
> >not using the right therms.
> >can someone point me in the right direction ? please :)
> >
> 
> It's not a trick. You simply mustn't put the button in the window; it must go 
> into the root view, the sole subview of the window, which is placed there and 
> managed by a UIViewController. Start your app with the UIView-based App 
> template and work from there, building your interface in the secondary nib. 
> Read up on view controllers in the docs, which are excellent on this point. 
> You may have to unwind the whole way your interface is constructed in order 
> to do this, so start with just the button and add stuff back after you get 
> that working. m.
> 
> --
> matt neuburg, phd = [email protected], <http://www.apeth.net/matt/>
> A fool + a tool + an autorelease pool = cool!
> AppleScript: the Definitive Guide - Second Edition!
> http://www.apeth.net/matt/default.html#applescriptthings

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to