Ok - I am doing this in my view controller which works better:

- (IBAction) displayInfo:(id)sender {

myInfoView = [[InfoViewController alloc] initWithNibName:@"InfoViewController"
bundle:[NSBundle mainBundle]];

myInfoView.view.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin
| UIViewAutoresizingFlexibleBottomMargin);

[self.view addSubview:myInfoView.view];

}


But there is a button I'd like to move in the subView (in portrait its near
the bottom, in Landscape it needs to move up into view). What's the best way
of doing that?



On Tue, Dec 22, 2009 at 1:05 PM, Eric E. Dolecki <edole...@gmail.com> wrote:

> Well - the subView is really a "settings" view - so it can be called up at
> any time. And of course the user can rotate the device around while it's
> already being viewed. So I suppose I can call a method in my subview from
> the willAnimateRotationToInterfaceOrientation:duration in the
> UIViewController to have it lay itself out as needed. My subView is a view
> controller too.
>
> Eric
>
>
> On Tue, Dec 22, 2009 at 1:04 PM, Hank Heijink (Mailinglists) <
> hank.l...@runbox.com> wrote:
>
>> On Dec 22, 2009, at 12:51 PM, Eric E. Dolecki wrote:
>>
>> > I have a view which controls it's UI when rotated. However, if there is
>> a
>> > subView in place, it rotates and I'd like to control it's UI too. In my
>> > subView the willAnimateRotationToInterfaceOrientation doesn't get fired.
>> I
>> > set up the shouldAutorotateToInterfaceOrientation. Does my main view
>> need to
>> > call something in my subView to get this to work? I'd think the subView
>> > would get the event too but it doesn't.
>>
>> I assume you mean -willAnimateRotationToInterfaceOrientation:duration:
>> which is a method on UIViewController, not UIView. If not, your signature is
>> wrong and that method would never be called.
>>
>> You'll need to manage your subviews from the controller when it receives
>> the message. That's what the controller is for: views themselves are not
>> aware of rotations.
>>
>> Best,
>> Hank
>>
>>
>
>
> --
> http://ericd.net
> Interactive design and development
>



-- 
http://ericd.net
Interactive design and development
_______________________________________________

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