SUMMARY

In this chapter, you learned how you can easily integrate the various built-in applications into your own iPhone applications. In particular, you saw how you can invoke the built-in SMS, Mail, Safari, and Phone simply by using a URL string. In addition, you learned how to send SMS and e-mail messages without leaving your application. You also learned about accessing the Photo Library applications using the classes provided by the iPhone SDK.

EXERCISES

  1. Name the various URL strings for invoking the Safari, Mail, SMS, and Phone applications.
  2. What is the class name for invoking the Image Picker UI in the iPhone?
  3. What is the class name for invoking the Mail Composer UI in the iPhone?
  4. What is the class name for invoking the Message Composer UI in the iPhone?

Answers to the exercises can be found in Appendix D.

image WHAT YOU LEARNED IN THIS CHAPTER

TOPIC KEY CONCEPTS
Sending e-mail from within your application
NSString *emailString =

@“mailto:[email protected]&subject=Subject&body=Body”;

[[UIApplication sharedApplication] openURL:[NSURL

URLWithString:emailString]];
Invoking Safari
[[UIApplication sharedApplication]

openURL:[NSURL URLWithString: @“http://www.apple.com”]];
Invoking the Phone
[[UIApplication sharedApplication]

openURL:[NSURL URLWithString: @“tel:12345678*2” ]];
Invoking SMS
[[UIApplication sharedApplication]

openURL:[NSURL URLWithString: @“sms:12345678*2” ]];
Accessing the Photo Library Use the UIImagePickerController class and ensure that your View Controller conforms to the UINavigationControllerDelegate protocol.
Invoking the Mail Composer UI Use the MFMailComposeViewController class.
Invoking the Message Composer UI Use the MFMessageComposeViewController class.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.248.255