views:

318

answers:

4

Hello,

does anyone know what is the name of the button in the right corner of the toolbar in the new Maps application? It's the button that unfolds the map and the view underneath offers buttons to switch between map modes. I would like to use it in my map application if it's a part of the SDK!

A: 

There's no standard UI component for this button, sorry. If you're resourceful, you could probably figure out a way to pull the image out of Maps, but Apple might not take kindly to using their art in non-approved ways.

Ben Gottlieb
+1  A: 

It's not part of the SDK. The actual file names of those images are UIButtonBarPageCurlSelected.png, UIButtonBarPageCurlDefault.png, so probably you can call it the "page curl button".


The unofficial way (warning, rejection, etc.) to get this button is to use

[[UIBarButtonItem alloc] initWithBarButtonSystemItem:109 target:... action:...]

To download a UIImage of these images from UIKit to add them into your project later, use [UIImage kitImageNamed:@"UIButtonBarPageCurlSelected.png"] and so on.

KennyTM
A: 

The only EASY way to do this is to use an undocumented method. This is banned by Apple and will result in having your application rejected from the app store. You can create something similar with UIViewAnimationTransitionCurlDown or UIViewAnimationTransitionCurlUp but these will cause the view to curl all the way up and not stop halfway.

cory.m.smith
A: 

Thanks for your answers!

What is an undocumented method? And how come you can use this stuff but it's not really desired by Apple? Will it be released in a future SDK? I don't see the point in creating an app that has features unavailable for all developers. This is a lot of questions, please point me to resources where I can find out more about this process if you know any (like where do you know all this from)?

Also, where can I find types of animations for views, like the one Cory mentioned?

Lex
Undocumented methods are just what they sound like, methods that aren't in the documentation. They exist because Apple hasn't yet finalized them. Apple doesn't want developers using methods that will likely change in the future. It may and may not be released in the future, but I wouldn't count on it.
kubi
Also, this isn't really an answer. Additional questions should be comments on the relevant answers.
Brad Larson
It's easier to create a new post for everyone to see than to post the same or similar questions to each answer.
Lex