WHAT'S IN THIS CHAPTER?
Integrating images and the image picker
Watching and recording videos
Playing and recording audio
Multimedia covers a broad range of items in the real world. Within the iPhone context, multimedia covers images, audio, video, and animation. The iPhone creates an innovative way of consuming multimedia, which hasn't gone unnoticed in the general media. The iPhone APIs provide an easy way of interacting with the multimedia functions of the device. We discuss each of the multimedia items throughout this chapter.
This section covers using images within your application, whether you want to display images, pick images, or even create your own.
To use and display images within a view, you can use the
UIImageView is a simple control that allows two basic actions: the ability to view an image and the ability to view multiple images with animations.
To view images, you can either drag a
UIImageView into the design view using Interface Builder or you can create a
UIImageView in code. For this example, you create your
UIImageView in code.
First you want to grab an image that you may have from your application. You can do this by using the static method
FromFile on the
UIImage class, passing in the path to the file.
Make sure you have included your image in the project and set the image's build action to Content; otherwise the image will not show. You can do this by right-clicking ...