Dear list,

So iPhone 5 is on its way, and suddenly we have a new resolution to deal
with. Well, a quick peek on the source for my app shows me that I'm not
ready. At all. I have hard coded height/width everywhere. So I try the
mighty Google trying to understand how this AutoresizingMask stuff, aaaand
just as last time I really don't "get it". That most examples are for using
IB doesn't really help either (screenshots like
http://i.stack.imgur.com/uQExw.png just makes me want to stab my head with a
fork).

It would be great if someone at Xamarin could write a "recipe" on how to
properly implement AutoResizing, but until then - I can't even get the most
basic things to work! From what I understand, what I want to do is anchor a
view at X,Y and then let it resize itself to fit the screen, then relatively
place stuff in it. Here's how you not do auto resize a view:

        public class TestView : UIViewController
        {
                public override void ViewDidLoad ()
                {
                        View.BackgroundColor = UIColor.Blue;

                        var test = new UIView(new RectangleF(10, 10, 200, 200)) 
{ 
                                BackgroundColor  = UIColor.Black,
                                AutoresizingMask = 
UIViewAutoresizing.FlexibleBottomMargin
                        };

                        View.AddSubview(test);
                }
        }

This, in my world, would anchor the black view at 10,10 have a minimum of
200,200 pixels and then resize its bottom to fit the screen. It of course
doesn't work at all because I'm probably thinking "layout manager" when I
should be "thinking different". I must be missing something obvious. 

Short version: I have a UIView. Right now it's at a fixed position at 0,90
with a 320px width and 370px height. When the iPhone 5 is released, I'll
need that 370 to continue down to fill the whole screen. How do I do that?

Any help is as always very much appreciated!




--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Autosize-our-app-for-iPhone-5-tp4657080.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to