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

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

Swift Development with Cocoa : Developing for the Mac and IOS App Stores

Jonathon Manning, Paris Buttfield-Addison, Tim Nugent

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

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

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

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

مشخصات کتاب

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

دربارهٔ کتاب

Annotation Ready to build apps for iPhone, iPad, and Mac now that Swift has landed? If youre an experienced programmer whos never touched Apple developer tools, this hands-on book shows you how to use the Swift language to make incredible iOS and OS X apps, using Cocoa and Cocoa Touch. Learn how to use Swift in a wide range of real-world situations, with Cocoa features such as Event Kit and Core Animation. Youll pick up Swift language features and syntax along the way, and understand why using Swift (instead of Objective-C) makes iOS and Mac app development easier, faster, and safer. Youll also work with several exercises to help you practice as you learn. Learn the OS X and iOS application lifecycleUse storyboards to design adaptive interfacesExplore graphics systems, including the built-in 2D and 3D game frameworksDisplay video and audio with AVFoundationStore data locally with the file system, or on the network with iCloudDisplay lists or collections of data with table views and collection viewsBuild apps that let users create, edit, and work with documentsUse MapKit, Core Location, and Core Motion to interact with the world Copyright 4 Table of Contents 5 Preface 13 Objective-C to Swift 14 Audience 15 Organization of This Book 15 Conventions Used in This Book 18 Using Code Examples 18 Safari® Books Online 19 How to Contact Us 19 Acknowledgments 20 Chapter 1. Cocoa Development Tools 21 The Mac and iOS Developer Programs 21 Registering for a Developer Program 22 Downloading Xcode 23 Creating Your First Project with Xcode 24 The Xcode Interface 27 Developing a Simple Swift Application 33 Designing the Interface 33 Connecting the Code 35 Using the iOS Simulator 37 Testing iOS Apps with TestFlight 39 Chapter 2. Programming with Swift 41 The Swift Programming Language 41 Playgrounds 43 Variables and Constants 44 Types 46 Tuples 48 Arrays 48 Dictionaries 49 Control Flow 50 Switches 53 Functions and Closures 55 Using Functions as Variables 57 Closures 59 Objects 60 Inheritance 62 Initialization and Deinitialization 62 Properties 64 Protocols 66 Extensions 67 Access Control 69 Operators 70 Generics 71 Interoperating with Objective-C 72 Using Objective-C and Swift in the Same Project 72 Using Swift Objects in Objective-C 73 Using Objective-C Objects in Swift 73 Modules 74 Memory Management 74 Working with Strings 75 Comparing Strings 76 Searching Strings 77 Data 77 Loading Data from Files and URLs 77 Serialization and Deserialization 78 Design Patterns in Cocoa 79 Model-View-Controller 79 Delegation 80 Chapter 3. Applications on OS X and iOS 83 What Is an Application? 83 Applications, Frameworks, Utilities, and More 84 What Are Apps Composed Of? 85 Using NSBundle to Find Resources in Applications 87 The Application Life Cycle 88 OS X Applications 88 iOS Applications 90 The Application Sandbox 95 Application Restrictions 96 Notifications with NSNotification 98 Chapter 4. Graphical User Interfaces 101 Interfaces in OS X and iOS 101 MVC and Application Design 102 Nib Files and Storyboards 102 Structure of a Nib File 103 Storyboards 106 Outlets and Actions 107 How Nib Files and Storyboards Are Loaded 108 Constructing an Interface 109 Guidelines and Constraints 110 Building an App with Nibs and Constraints 111 Interfaces on iOS 115 Launch Screen Files 117 UI Dynamics 118 UI and Gravity 118 Snapping UI 119 Core Animation 120 Layers 121 Animations 122 Chapter 5. Closures and Operation Queues 125 Closures in Cocoa 126 Concurrency with Operation Queues 127 Operation Queues and NSOperation 128 Performing Work on Operation Queues 128 Putting It All Together 129 Chapter 6. Drawing Graphics in Views 135 How Drawing Works 135 The Pixel Grid 137 Retina Displays 138 Pixels and Screen Points 139 Drawing in Views 140 Frame Rectangles 140 Bounds Rectangles 141 Building a Custom View 142 Filling with a Solid Color 143 Working with Paths 144 Creating Custom Paths 146 Multiple Subpaths 148 Shadows 149 Gradients 152 Transforms 155 Chapter 7. SpriteKit 159 SpriteKit’s Architecture 159 Making an App That Uses SpriteKit 160 Working with SpriteKit Scenes 161 SpriteKit Nodes 163 Putting Sprites in Scenes 165 Responding to Touches 166 Working with Textures 167 Texture Atlases 168 Working with Text 169 Animating Content with Actions 170 Using Shape Nodes 171 Using Image Effect Nodes 173 Adding Physics to SpriteKit Objects 174 Adding Joints to SpriteKit Objects 175 Lighting SpriteKit Scenes 176 Constraints 177 Using Shaders in SpriteKit 177 Using SpriteKit Editor 180 Chapter 8. SceneKit 183 SceneKit Structure 184 Working with SceneKit 185 Adding a SceneKit View 185 Adding a Scene 186 Adding a Camera 187 Adding a 3D Object 188 Adding Lights 189 Animating Content in the Scene 190 Creating Text Geometry 192 Combining Animations 193 Working with Materials 194 Normal Mapping 196 Hit Testing 198 Constraints 201 Loading Data from COLLADA Files 202 Adding Physics to the Scene 205 Chapter 9. Audio and Video 209 AV Foundation 209 Playing Video with AVPlayer 210 AVPlayerLayer 211 Putting It Together 211 AVKit 215 AVKit on iOS 217 Playing Sound with AVAudioPlayer 219 Speech Synthesis 220 Working with the Photo Library 221 Capturing Photos and Video from the Camera 222 Building a Photo Application 224 The Photo Library 227 Chapter 10. iCloud and Data Storage 229 Preferences 229 Registering Default Preferences 230 Accessing Preferences 231 Setting Preferences 231 Working with the Filesystem 232 Using NSFileManager 233 File Storage Locations 237 Working with the Sandbox 237 Enabling Sandboxing 237 Open and Save Panels 238 Security-Scoped Bookmarks 239 iCloud 240 What iCloud Stores 241 Setting Up for iCloud 242 Testing Whether iCloud Works 242 Storing Settings 243 Handling External Changes 244 The iOS Counterpart 245 iCloud Storage 248 iCloud Storage on OS X 248 iCloud Storage on iOS 253 Document Pickers 255 Using iCloud Well 259 Chapter 11. Cocoa Bindings 261 Binding Views to Models 261 A Simple Bindings App 262 Binding to Controllers 265 Array and Object Controllers 266 A More Complex Bindings App 267 Chapter 12. Table Views and Collection Views 275 Data Sources and Delegates 275 Table Views 276 UITableView on iOS 276 NSTableView on OS X 284 Collection Views 290 UICollectionView on iOS 290 Chapter 13. Document-Based Applications 295 The NSDocument and UIDocument Classes 296 Document Objects in MVC 296 Kinds of Documents 297 The Role of Documents 298 Document-Based Applications on OS X 298 Autosaving and Versions 299 Representing Documents with NSDocument 299 Saving Simple Data 300 Saving More Complex Data 302 Document-Based Applications on iOS 306 Chapter 14. Networking 313 Connections 313 NSURL 314 NSURLRequest 315 NSURLSession 316 NSURLResponse and NSHTTPURLResponse 316 Building a Networked Application 317 Bonjour Service Discovery 319 Browsing for Shared iTunes Libraries 319 Multipeer Connectivity 321 Chapter 15. Working with the Real World 327 Working with Location 327 Location Hardware 328 The Core Location Framework 330 Working with Core Location 331 Geocoding 334 Region Monitoring and iBeacons 337 Locations and Privacy 340 Maps 340 Using Maps 340 Annotating Maps 341 Maps and Overlays 342 Device Motion 344 Working with Core Motion 345 Using the Built-in Altimeter 349 Using the Pedometer 350 Printing Documents 351 Printing on OS X 352 Printing on iOS 353 Game Controllers 354 App Nap 356 Authenticating Using Touch ID 358 Handoff 362 Chapter 16. EventKit 369 Understanding Events 369 Accessing the Event Store 370 Accessing Calendars 371 Accessing Events 372 Working with Events 373 Building an Events Application 374 User Privacy 379 Chapter 17. Instruments and the Debugger 381 Getting Started with Instruments 382 The Instruments Interface 384 Observing Data 385 Adding Instruments from the Library 386 Fixing Problems Using Instruments 388 Retain Cycles and Leaks 392 Using the Debugger 394 Setting Breakpoints 394 Inspecting Memory Contents 397 Working with the Debugger Console 398 View Debugging 398 The Testing Framework 401 Writing Tests 401 Writing Asynchronous Tests 403 Performance-Testing Blocks with Tests 403 Debug Gauges 404 Performance Optimization 404 Chapter 18. Sharing and Notifications 407 Sharing 407 Sharing on iOS 410 Sharing on OS X 413 Notifications 413 Registering Notification Settings 414 Push Notifications 420 What Happens When a Notification Arrives 421 Sending Push Notifications 422 Setting Up to Receive Push Notifications 423 Receiving Push Notifications 424 Local Notifications 426 Chapter 19. Nonstandard Apps 429 Command-Line Tools 429 Preference Panes 430 How Preference Panes Work 431 Preference Domains 432 Building a Sample Preference Pane 433 Status Bar Items 435 Building a Status Bar App 435 iOS Apps with Multiple Windows 437 Chapter 20. Working with Text 441 Internationalization and Localization 441 Strings Files 441 Creating a Sample Localized Application 442 Formatting Data with NSFormatter 450 Testing Different Locales 452 Formatting Numbers, Lengths, Mass, Energy, and Data 453 NSNumberFormatter 453 NSEnergyFormatter, NSMassFormatter, and NSLengthFormatter 454 NSByteCountFormatter 455 Detecting Data with NSDataDetector 456 TextKit 458 Index 461 About the Authors 472 www.it-ebooks.info Ready to build apps for iPhone, iPad, and Mac now that Swift has landed? If you’re an experienced programmer who’s never touched Apple developer tools, this hands-on book shows you how to use the Swift language to make incredible iOS and OS X apps, using Cocoa and Cocoa Touch.Learn how to use Swift in a wide range of real-world situations, with Cocoa features such as Event Kit and Core Animation. You’ll pick up Swift language features and syntax along the way, and understand why using Swift (instead of Objective-C) makes iOS and Mac app development easier, faster, and safer. You’ll also work with several exercises to help you practice as you learn.Learn the OS X and iOS application lifecycleUse storyboards to design adaptive interfacesExplore graphics systems, including the built-in 2D and 3D game frameworksDisplay video and audio with AVFoundationStore data locally with the file system, or on the network with iCloudDisplay lists or collections of data with table views and collection viewsBuild apps that let users create, edit, and work with documentsUse MapKit, Core Location, and Core Motion to interact with the world Ready to build apps for iPhone, iPad, and Mac now that Swift has landed? If you're an experienced programmer who's never touched Apple developer tools, this hands-on book shows you how to use the Swift language to make incredible iOS and OS X apps, using Cocoa and Cocoa Touch. You'll learn how to use Swift in a wide range of real-world situations, with Cocoa features such as Event Kit and Core Animation

قیمت نهایی

۴۴٬۰۰۰ تومان