Search code examples
cocoa-touchuikitipaduipopovercontroller

Remove border for UIPopoverController


I have a requirement where in I have to display a custom border for UIPopoverController's popover view instead of the default "Black theme" border. Is it possible?

I cannot use the default black border because it doesnt suite the application's color theme.

There is no provision in the SDK to do this. I have also googled to see if someone else have faced this problem and if they have solved it, but with no luck!

Awaiting suggestions.

Thanks, Raj


Solution

  • Solved this by using UIView and also by overriding the hitTest in the main rootViewController's view to see if the touch point is outside that view. If so, the event will be consumed to dismiss the new popover, otherwise the event will be forwarded to the new popover.