Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a small popup in iOS?

I'm looking for the simplest code in order to implement a small popup (NOT a full screen modal popup or alert view). I just need it to display some basic text inside the popup, then exit it when I click away. The popup in the EleMints app is a good example.

like this

like image 682
Radrider33 Avatar asked Jan 09 '12 04:01

Radrider33


People also ask

Can iPhone do pop-up screen?

You can allow pop-ups on your iPhone using both the Safari and Chrome browsers. To allow pop-ups in your iPhone's Safari app, head to the Safari section of the Settings app. The iPhone Chrome app has a "Content Settings" menu that lets you block or allow pop-ups.

How do I get popups on my iPhone?

Here's how to allow pop-ups on iPhone and iPad: Open the Settings app. Tap Safari. Next to Block Pop-ups, toggle the button to the Off position.

What are pop-up buttons?

A pop-up button displays a menu of mutually exclusive options. After people choose an item from a pop-up button's menu, the menu closes, and the button can update its content to indicate the current selection.


1 Answers

UIPopoverController does this, but it's limited to iPad only. If you need this on iPhone, just implement a custom UIView subclass. Then when you want to show your popover, instantiate the subclass and add it to your view, maybe with some animation.

like image 145
Jerry Avatar answered Oct 21 '22 07:10

Jerry