David542
David542

Reputation: 110412

iPhone UI element -- customized or default?

Is the following pull-up to "Set profile photo" below a customized UI element or a default one? If it's a default one, how would I add one to my iPhone app?

enter image description here

Upvotes: 1

Views: 56

Answers (2)

nhgrif
nhgrif

Reputation: 62062

That's the new look for . It's a default iOS7 UI element. In your screenshot, the "Set profile photo" part is set by the title of the action sheet.

initWithTitle:delegate:cancelButtonTitle:destructiveButtonTitle:otherButtonTitles:

UIActionSheet Class Reference

In iOS6, it looked like this:

enter image description here

Source: apple.developer.com

Upvotes: 0

Nils Ziehn
Nils Ziehn

Reputation: 4331

Its a UIActionSheet

for Documentation read: UIActionSheet

Basically it works like this:

 - (void)iWantToShowAnActionSheet
{
  UIActionSheet* sheet = [[UIActionSheet alloc] initWithTitle:@"Set profile photo"
                            delegate:self
                            cancelButtonTitle:@"Cancel"
                            destructiveButtonTitle:nil
                            otherButtonTitles:@"Choose existing photo",@"Take new photo"];
  [sheet showInView:self.view];//example for using it in viewcontroller.
} 

For other ways to display it have a look at the demo (link provided at the top) under "Presenting the Action Sheet"

Upvotes: 1

Related Questions