Hello Matronix,

are you trying to present UIViewController or just UIView?

If you just want to present UIView, and you already have *.xib file somewhere 
at hand, open this up, and add UIView to the screen, resize it, centre it and 
then look up for the metrics.
After that, from you current view,you can create this.

        UIView modalView = new UIView();
        modalView.frame = new RectangleF(position on screen x, position on 
screen y, height, width)

        this.View.Add(modalView);

Also if you want to block your users from touching any other controls, you can 
first load transparent UIView, and on top of that your modal UIView.

My other suggestion would be to use UIViewController, and set 
UIModalPresentationStyle to FormSheet. Problem with that for me is that you 
can't resize that.

btnPresentModalView.TouchUpInside += (object sender, EventArgs e) => 
{
        UIViewController modalView = new UIViewController()
        {
                ModalTransitionStyle = UIModalTransitionStyle.CoverVertical,
                ModalPresentationStyle = UIModalPresentationStyle.FormSheet,
        } ;
        this.NavigationController.PresentViewController(modalView,true,null);
} ;


Hope this helps!

Iki





On Dec 19, 2012, at 8:24 PM, Matronix <[email protected]> wrote:

> I'm trying to popup a modal view and have it centered in my page to have the
> user enter information to be authenticated. I am having issues creating a
> view that is of the size that I want and then centered. 
> 
> I have gotten the view to change size by changing: 
> *this.View.Superview.Bounds* on the viewController. The issue is that the
> view shows up on at the top corner and is not centered. 
> 
> 
> 
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/Popup-Modal-View-Custom-Size-and-Centered-tp4657877.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [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