O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Photo Assets and PHAsset Class

Photos and videos are, at their base level, model objects. Think back to our old friend, the Model-View-Controller, introduced back in Model-View-Controller. A well-designed model object should be a reusable piece of information that can be accessed from many different controller objects without any dependencies tying it to one specific application or project.

Model objects contain data, and they provide access to and implement logic on data. Photos and videos are just sets of data that we store on our phone that can be accessed and modified by many different applications. Our photo model objects are also read-only and thread safe, so no worrying about another application coming in and changing our photos out ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required