Search code examples
iosxamarin.iosios8xamarinuipopovercontroller

UIPopoverController wrong UITextField height in iOS 8


In my app I use a UIPopoverController with an embedded UINaviagtionController to show a single line UITextField to enter a number. This kind of input was working up to iOS 7.1. Since iOS 8.0 the size of the UITextField is wrong. I tried out to change the AutoresizingMask, Frame, EdgesForExtendedLayout, ... but nothing is working.

As you can see in the screenshots bellow, there is a strange behaviour.

A sample project for Xamarin.iOS is available: http://www.danflash.com/files/dev/PopoverTest.zip

iOS 7 iOS 8


Solution

  • I have found the issue. I had to set contentViewController.EdgesForExtendedLayout = UIRectEdge.None; within the method:

    public static PopoverInputController GetPopoverController(...)

    It seems that Apple did some more changes to the UI regarding the layout stuff as expected.