چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Learning Cocoa with Objective-C : Developing for the Mac and IOS App Stores

Paris Buttfield-Addison, Jonathon Manning, Tim Nugent

قیمت نهایی

۴۹٬۰۰۰ تومان

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

سال انتشار
۲۰۱۴
فرمت
PDF
زبان
انگلیسی
حجم فایل
۱۳٫۲ مگابایت

دربارهٔ کتاب

Get up to speed on Cocoa and Objective-C, and start developing applications on the iOS and OS X platforms. If you don’t have experience with Apple’s developer tools, no problem! From object-oriented programming to storing app data in iCloud, the fourth edition of this book covers everything you need to build apps for the iPhone, iPad, and Mac. You’ll learn how to work with the Xcode IDE, Objective-C’s Foundation library, and other developer tools such as Event Kit framework and Core Animation. Along the way, you’ll build example projects, including a simple Objective-C application, a custom view, a simple video player application, and an app that displays calendar events for the user. Learn the application lifecycle on OS X and iOS Work with the user-interface system in Cocoa and Cocoa Touch Use AV Foundation to display video and audio Build apps that let users create, edit, and work with documents Store data locally with the file system, or on the network with iCloud Display lists or collections of data with table views and collection views Interact with the outside world with Core Location and Core Motion Use blocks and operation queues for multiprocessing Copyright 4 Table of Contents 5 Preface 13 Audience 13 Organization of This Book 13 Conventions Used in This Book 16 Using Code Examples 17 Safari庐 Books Online 18 How to Contact Us 18 Acknowledgments 19 Chapter聽1.聽Cocoa Development Tools 21 The Mac and iOS Developer Programs 21 Registering for a Developer Program 22 Downloading Xcode from Apple Developer 23 Getting Around in Xcode 23 Creating Your First Cocoa Project 25 The Xcode Interface 27 Developing a Simple Objective-C Application 34 Designing the Interface 34 Connecting the Code 35 Using the iOS Simulator 37 Chapter聽2.聽Object-Oriented Programming with Objective-C 41 Object-Oriented Programming 41 Objects 42 Inheritance 43 Interfaces and Implementations 43 Methods 44 Messages 45 Properties 46 Protocols 49 Class Extensions 50 Modules 51 Memory Management 53 Reference Counting 53 Automatic Reference Counting 53 Object Graphs in Objective-C 54 The NSObject Lifecycle 55 Allocation and Initialization 55 Retain and Release 56 Finalization and Deallocation 56 Chapter聽3.聽Foundation 57 Mutable and Immutable Objects 57 Strings 58 Creating Strings 59 Working with Strings 59 Comparing Strings 62 Searching Strings 63 Arrays 63 Fast Enumeration 66 Mutable Arrays 66 Dictionaries 68 NSValue and NSNumber 69 Data 70 Loading Data from Files and URLs 70 Serialization and Deserialization 71 Design Patterns in Cocoa 74 Model-View-Controller 74 Delegation 76 Key-Value Observing 76 Chapter聽4.聽Applications on OS X and iOS 79 What Is an Application? 79 Applications, Frameworks, Utilities, and More 80 What Are Apps Composed Of? 81 Using NSBundle to Find Resources in Applications 83 The Application Lifecycle 84 OS X Applications 84 iOS Applications 86 The Application Sandbox 91 Application Restrictions 91 Chapter聽5.聽Graphical User Interfaces 95 Interfaces in OS X and iOS 95 MVC and Application Design 96 Nib Files 96 Structure of a Nib File 97 Storyboards 101 Outlets and Actions 101 How Nib Files Are Loaded 102 Constructing an Interface 103 Guidelines and Constraints 103 Building an App with Nibs and Constraints 105 UI Dynamics 107 UI and Gravity 108 Snapping UI 109 Designing Interfaces for Both iOS 6 and 7 110 Core Animation 111 Layers 112 Animations 113 Chapter聽6.聽Blocks and Operation Queues 115 Blocks 115 Block Syntax 116 Block Lifecycles 117 Methods with Block Parameters 119 Blocks and Memory Management 120 Modifying Local Variables from Inside Blocks with __block 120 Concurrency with Operation Queues 121 Operation Queues and NSOperation 122 Performing Work on Operation Queues 122 Putting It All Together 124 Chapter聽7.聽Drawing Graphics in Views 129 How Drawing Works 129 The Pixel Grid 131 Retina Displays 131 Pixels and Screen Points 133 Drawing in Views 134 Frame Rectangles 134 Bounds Rectangles 135 Building a Custom View 136 Creating the Project 136 Filling with a Solid Color 137 Working with Paths 138 Creating Custom Paths 140 Multiple Subpaths 142 Shadows 144 Gradients 148 Transforms 151 SpriteKit 153 Chapter聽8.聽Audio and Video 157 AV Foundation 157 Playing Video with AVPlayer 158 AVPlayerLayer 159 Putting It Together 159 AVPlayerView 163 Playing Sound with AVAudioPlayer 166 Speech Synthesis 167 Working with the Photo Library 168 Capturing Photos and Video from the Camera 168 Building a Photo Application 170 The Photo Library 172 Chapter聽9.聽Model Objects and Data Storage 175 Key-Value Coding 176 Key-Value Observing 178 Registering for Change Notifications 178 Notifying Observers of Changes 180 Notifications with NSNotification 180 Preferences 181 Registering Default Preferences 182 Accessing Preferences 183 Setting Preferences 184 Working with the Filesystem 184 Using NSFileManager 186 File Storage Locations 189 Working with the Sandbox 189 Enabling Sandboxing 189 Open and Save Panels 190 Security-Scoped Bookmarks 191 Chapter聽10.聽Cocoa Bindings 193 Binding Views to Models 193 A Single Bindings App 194 Binding to Controllers 197 Array and Object Controllers 198 A More Complex Bindings App 199 Chapter聽11.聽Table Views and Collection Views 207 Data Sources and Delegates 207 Table Views 208 UITableView on iOS 208 Sections and Rows 209 Table View Controllers 209 Table View Cells 210 Implementing a Table View 213 NSTableView on OS X 216 Sorting a Table View 220 NSTableView with Bindings 221 Collection Views 222 UICollectionView on iOS 222 Chapter聽12.聽Document-Based Applications 227 The NSDocument and UIDocument Classes 228 Document Objects in MVC 228 Kinds of Documents 228 The Role of Documents 229 Document-Based Applications on OS X 230 Autosaving and Versions 230 Representing Documents with NSDocument 231 Saving Simple Data 232 Saving More Complex Data 234 Document-Based Applications on iOS 238 Chapter聽13.聽Networking 247 Connections 247 NSURL 248 NSURLRequest 249 NSURLConnection 250 NSURLSession 250 NSURLResponse and NSHTTPURLResponse 251 Building a Networked Application 251 Bonjour Service Discovery 253 Browsing for Shared iTunes Libraries 254 Multipeer Connectivity 256 Chapter聽14.聽Working with the Real World 261 Working with Location 261 Location Hardware 262 The Core Location Framework 263 Working with Core Location 265 Geocoding 268 Region Monitoring and iBeacons 271 Locations and Privacy 272 Maps 273 Using Maps 273 Annotating Maps 274 Maps and Overlays 275 Device Motion 276 Working with Core Motion 277 Printing Documents 281 Printing on OS X 282 Printing on iOS 283 Game Controllers 284 App Nap 287 Chapter聽15.聽Event Kit 289 Understanding Events 289 Accessing the Event Store 290 Accessing Calendars 291 Accessing Events 291 Working with Events 292 Building an Events Application 293 User Privacy 298 Chapter聽16.聽Instruments and the Debugger 301 Getting Started with Instruments 302 The Instruments Interface 302 Observing Data 304 Adding Instruments from the Library 306 Fixing Problems with Instruments 306 Retain Cycles and Leaks 312 Using the Debugger 315 Setting Breakpoints 315 Inspecting Memory Contents 319 Working with the Debugger Console 319 Chapter聽17.聽Sharing and Notifications 321 Sharing 321 Sharing on iOS 324 Sharing on OS X 326 Notifications 327 Push Notifications 327 Sending Push Notifications 328 Setting Up to Receive Push Notifications 329 Receiving Push Notifications 331 Local Notifications 333 Chapter聽18.聽Nonstandard Apps 335 Command-Line Tools 335 Preference Panes 337 How Preference Panes Work 337 Preference Domains 338 Building a Sample Preference Pane 339 Status Bar Items 341 Building a Status Bar App 341 iOS Apps with Multiple Windows 343 Chapter聽19.聽Working with Text 347 Internationalization and Localization 347 Strings Files 347 Creating a Sample Localized Application 348 Formatting Data with NSFormatter 350 Detecting Data with NSDataDetector 353 TextKit 355 Chapter聽20.聽iCloud 357 What iCloud Stores 357 Setting Up for iCloud 358 Testing Whether iCloud Works 360 Storing Settings 360 iCloud Storage 365 Index 373 About the Authors 388

قیمت نهایی

۴۹٬۰۰۰ تومان