You could try setting the button's AutoresizingMask to include 
UIViewAutoresizing.FlexibleTopMargin. I've used 
(UIViewAutoresizing.FlexibleLeftMargin | 
UIViewAutoresizing.FlexibleRightMargin) to get a button to be properly centered 
after rotation, so the FlexibleTopMargin should keep the button the same 
relative distance from the top of the view. Or maybe you need 
FlexibleBottomMargin to make its position relative to the bottom of the view. 
Either way, if it works, you won't need to do any manual repositioning within 
WillRotate().

From: [email protected] 
[mailto:[email protected]] On Behalf Of Jeff Stedfast
Sent: Thursday, November 03, 2011 10:09 AM
To: Mittchel Van Vliet
Cc: MonoTouch List
Subject: Re: [MonoTouch] GlassButton in dialogViewController

How did you try to resize the button?

You might also need to re-layout your view? I'm not sure.

Jeff

On Thu, Nov 3, 2011 at 10:26 AM, Mittchel Van Vliet 
<[email protected]<mailto:[email protected]>> wrote:
Tried that, but resizing doesnt help:(

2011/11/3 Jeff Stedfast <[email protected]<mailto:[email protected]>>
Hi Mittchel,

I'm no expert, but I think what you'll have to do is to override the 
WillRotate() and/or DidRotate() methods on your ViewController and resize your 
buttons.

Hope that helps,

Jeff

On Thu, Nov 3, 2011 at 7:33 AM, Mittchel Van Vliet 
<[email protected]<mailto:[email protected]>> wrote:
Hello everyone,

I posted this question earlier, I found a solution for it but it doesn't work 
that well and neat so I'm trying it here once again.

I made a DialogViewController with some basic elements where the user can fill 
in some stuff. After that there has to be a button(glassbutton) so the user can 
hit that button and proceed to the next view.

Now, when I instantiate the button and add it the SubView everything seems 
fine.. but when I rotate the landscape the button falls under the TabBar. So in 
other words: the glass button doesn't scale with the rest of the elements.

How can I fix this?

Thanks in advance,
Mittchel

_______________________________________________
MonoTouch mailing list
[email protected]<mailto:[email protected]>
http://lists.ximian.com/mailman/listinfo/monotouch



_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to