Autoresizing UIView

LippelLippel DEMember ✭✭

Helllo, im trying to create a camera view.
Right now, I'm having a viewrenderer render a UIView to a Forms View.

in the onelementchanged I have the following lines:

var uiView = new UIView(UIScreen.MainScreen.Bounds)
                    AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight,
                    AutosizesSubviews = true

This makes my UIView fit the whole screen (which is what I want).

But on rotation changes, the UIView does not resize and the preview is flipped. How do you guys approach this?
I don't seems to be looking in the correct direction I think, as I do not find a simple solution to make this UIView resize on orientation changes.

Sign In or Register to comment.