iphone map fold button in new map app - iphone

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!
EDIT:
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?

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.

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.

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.

Related

Walkthrough / tooltip / demo for iPhone app

I've got an app that appeals to an older demographic. The interface is simple but with some custom controls where a simple graphic is not completely self explanatory (save to playlist, sort by genre for example).
I've seen plenty of apps with great first run walkthroughs (examples here) but don't know if there are some existing libraries out there.
Your suggestions are welcome.
I found CMPopTipView that, while it doesn't fit my needs completely may be of use to those that are looking to pop a tool tip every now and then.
Most of these overlays/walkthroughs can be accomplished by adding a subview to the main window of your app. There are some edge cases to take into account, but for the most part, you need to simply grab a reference to the key window with
UIWindow* keyWindow;
keyWindow = [UIApplication sharedApplication].keyWindow;
You then would add your overlay view as a subview with:
[keyWindow addSubview:anOverlayView];
Handling taps to dismiss the overlay can be done with a tap gesture recognizer.
If you are looking to create a click-through demo which runs in the browser and on mobile devices, AppDemoStore is the right tool for you. You just have to upload some relevant app screenshots, add hotspots for the navigation between the screens and callouts for explanations. It takes only a couple of minutes and it's free.
Regards,
Daniel

Lion style non-modal alert example for iOS

Xcode4 introduced the gray-rounded-square style non-modal alerts that momentarily appear as required. For an example, see 'Build Succeeded'. iirc, this style of non-modal alert is also used elsewhere in Lion.
Now, also iirc, I believe I saw some official iPhone sample code showing how they recommend this effect is achieved in iPhone Apps, but I can't find it again. I'd like to use in my App this to achieve a consistent style.
If someone recalls what I'm talking about, I'd appreciate a link. Thanks.
I think you're talking about the bezel notification style? On iOS, I know SSToolkit has support for such a display (under HUD View).
Another way: This uses MBProgressHUD and provides sample code.
I think you can do it using a momentary UIActivityIndicator. Something like this
EDIT: or this
EDIT: The idea is the same, a custom activity indicator. The above answer gives you some more specific links to your problem. But well it is an activity indicator you're looking for.

iPhone SDK - Expanding Buttons like in the camera app

I am curious as to whether or not there is an open source solution to replicate the flash button in the iOS camera applicaiton.
I have seem many other apps use this, but there doesn't seem to be a native way, so I assume there is a common source out there.
It is possible to get the flash button by using UIImagePickerController class, but most of the camera apps out there don't seem to be using this (or perhaps they subclass it, which is against apple's terms).
I am looking for a way to replicate the expanding behavior of the button. Any thoughts?
It doesn't sound too hard.
The way I'd do it is to separate the right curve of the button (as images), and make a UIView that has the left part of the button and the right curve as subviews.
When it's tapped, slide the right curve and animate the extra buttons in.
You could use a stretchable UIImage (see UIImage documentation) and then just animate the frame changing.
In the Apple 2010 WWDC Sample code (downloadable via iTunes, otherwise I'd post it here), there are several sample applications which use this control. They call the class ExpandyButton. I realize I'm answering my question, but hopefully someone out there can find this useful.
While looking for a similar solution to this problem I came across this code which was extremely helpful. Similar to ExpandyButton it fit my needs better.
https://github.com/ddebin/DDExpandableButton

IPhone SDK - How do I implement an Apple like rating UIAlertView?

Does anyone have an Idea how to implement an UIAlertView for rating purpose like Apple show when you are removing an app from the iPhone?
You can choose how many stars to rate the app or don't rate it at all.
I already have a view that shows the stars according to the user touches but don't know how to connect it to the UIAlertView...
Thanks!
A good tutorial how to do this:
http://iphonedevelopment.blogspot.com/2010/05/custom-alert-views.html
I like the TSAlertView. It's a complete replacement of UIAlertView based on UIView. So you don't use any private APIs.
I used it in multiple projects and I really like it. Take a look at it. With that one it should be easy to add your "starview" to the AlertView becuase you have methods to add a contentView.

iPhone: Custom UIImagePickerController?

It seems like the built in UIImagePickerController cannot accept sources other than its device camera Roll.
I would like to get the functionality of picking and enlarging pictures within my own app. Also I would like to allow the user to select the pictures and save it into their camera roll (so they can later use it as wall paper)
1) what is the recommended way of building a custom UIImagePickerController that supports what I need ? Is there another built in controller I am missing?
3) Is there a way to take a UIImage and save it to the desktop background of the device directly? Or is it a two step (first save to camera roll), then have the user load the picture from there to save as wallpaper
Thanks in advance!!
At this point, it seems that the only way to build a custom UIImagePickerController functionality is to subclass, and then muck with the view hierarchy directly. This allows you to move, hide, and replace UI elements and access the non-public classes that control the operation of the camera, but as you probably gather, this technique is both unsupported (in that it may, and probably will, break with future updates) and not recommended (in that it may, and probably will, get your app rejected from the App Store if detected).
As far as your second point (somehow numbered 3), John is right: there is no call in the public SDK to accomplish this. You could probably hack something together if you're clever, but remember the warnings in my first paragraph...
Regarding #3) there is no public call in the SDK to save an UIImage to the desktop.
I don't know about the rest of your questions though.
Just today I started a open source UIImagePickerController clone, it is not perfect but it works quite ok. Feel free to fork http://github.com/jeena/JPImagePickerController