PDA

View Full Version : Needs an explanation




arnieterm
Nov 6, 2008, 08:29 AM
Recently I am viewing Games category in IPhone [device] app store. For a particular game there is a "Tell a Friend" button on the nav bar.Tapping it opens a new mail creation screen with "Cancel" and "Send" buttons on nav bar.
I want to know:
-The new mail creation screen is from seperate application [Mail.app] or an inbuilt screen in app store. It seems to me that the app store application is paused while mail app is in process, is it right?
Does there exists any role of UIAppDelegate's applicationDidBecomeActive?
How can we pause an app?



robbieduncan
Nov 6, 2008, 08:32 AM
The AppStore is an Apple application: it has access to methods that non-Apple apps do not. Just because it (or say the Photos app and the way it can attach a photo to an email) can do it does not mean there is a way to do it in the public SDK.

jnic
Nov 6, 2008, 09:06 AM
For a particular game there is a "Tell a Friend" button on the nav bar.

Are you referring to the App Store itself or to a specific game? If the latter then it's certainly possible, otherwise refer to robbieduncan's reply.

Either way, you can emulate this behavior in your own applications by creating a view that is visibly and functionally similar to the mail application, using the SDK's networking and ABAddressBook features.

Relevant docs:
http://developer.apple.com/iphone/library/navigation/Topics/NetworkingInternet/index.html
http://developer.apple.com/iphone/library/navigation/Frameworks/CocoaTouch/AddressBookUI/index.html

robbieduncan
Nov 6, 2008, 09:12 AM
Are you referring to the App Store itself or to a specific game?

It's in the App Store application on the iPhone: I've just had a look. On every app (game or otherwise) there is a "Tell a Friend" button in the top right of the applications page (in the Nav Bar). When you touch it a new mail slides up from the bottom with the Subject and Content pre-supplied. You could do something very similar with a mailto: URL but I don't think the transition would be the same...

jnic
Nov 6, 2008, 09:20 AM
Thanks, found it. If you used your own view with a few UITextViews then you could get the same transition effect with a CGAffineTransform, though you'd have to get the timing of the keyboard correct so that they slide in at the same moment.