lostAtSeaJoshua
lostAtSeaJoshua

Reputation: 1755

How to present UIView with triangle popup overlay?

What is this UIView exactly called? It is distinct because of the triangle at the top and used with UINavigationBarButtonItems.
Also how is this achieved in code with the title and button inside? Thank you! UIView Presentation

Upvotes: 0

Views: 755

Answers (1)

drewag
drewag

Reputation: 94733

Before iOS 8 there was nothing built into UIKit that does this for you. You have to draw the view yourself or use an image to create the triangle.

The easiest way to achieve this is probably to make a full screen image with transparency and put it onto a transparent view that you display on top of the existing view to "present the view".

If you only need to support iOS 8, you should be able to use a UIPopoverPresentationController.

Upvotes: 1

Related Questions