Donal Rafferty
Donal Rafferty

Reputation: 19826

iPhone view with pop up animation?

I'm new to iPhone development, its going OK so far, I've managed to get to grips with the Tab bar, navigation bar and tableviews.

However I want to be able to copy what the settings app does on the device when a user wants to change language.

In Settings, General, International when a user clicks on Language a new screen animates over the previous screen with a navigation bar that has a cancel and done button and a table view showing the languages available for selection.

I cant seem to find how to do this via Google so I was wondering if someone could point me in the right direction of a tutorial or what I should be searching for? Is it type of view or a certain way to animate a view?

Upvotes: 1

Views: 1000

Answers (2)

Scott Little
Scott Little

Reputation: 1939

This is done via a method available on UIViewController (and thus all of its derivatives as well) called - presentModalViewController:animated:. You simply need to create a new view controller that you want to display and pass it into that.

See the link to the UIViewController docs above for more info and the complementary method - dismissModalViewControllerAnimated: to close the view. The docs have links to example code on how to use them as well.

Upvotes: 5

Vin
Vin

Reputation: 10548

in iPhone, it's done through modal view controller. Refer this tutorial.

Upvotes: 2

Related Questions