Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Creating tip / help popups

Are there any built in, open source, or tutorials for creating a reusable easy to use popup for use with in game-help.

Essentially I would like to, on first run of a game, show popup tips / help that "point to" various on screen objects to help a user orient themselves with the game.

Update: Here is an example of how I ultimately want it to look / behave although I don't need it that generic but as close as possible would be good

like image 991
Chris Avatar asked Mar 05 '12 14:03

Chris


2 Answers

I like those: https://github.com/chrismiles/CMPopTipView.

Nice and easy to set up.

like image 156
Shmidt Avatar answered Oct 05 '22 09:10

Shmidt


Essentially what you need is a custom view.

You cannot use Apple's UIAlertView since its purpose is very different from what you are looking for.

I don't know what are your specific needs, but you may use a simple UILabel:

CGRect ref = objectToAddress.frame;

UILabel *tip = [[UILabel alloc] initWithFrame:CGRectMake(ref.x+ref.width, 
                                                         ref.y+ref.height,
                                                         width,
                                                         height)];

[tip setText:messageToShow];

[self.view addSubview:tip];
[tip release];

where width and height are the dimensions of the tip you want to show and messageToShow is the message you want to display.
You can, of course, customize your UILabel as you like, changing font or background color. Check the reference for additional informations.

EDIT:

You may take a look at a possible popover implementation for iPhone: WEPopover. On the iPad you can use directly Apple's UIPopoverController

like image 23
Manlio Avatar answered Oct 05 '22 07:10

Manlio