Muutke küpsiste eelistusi

E-raamat: Swift Development with Cocoa: Developing for the Mac and iOS App Stores

  • Formaat: 474 pages
  • Ilmumisaeg: 10-Dec-2014
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781491909706
  • Formaat - PDF+DRM
  • Hind: 28,67 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 474 pages
  • Ilmumisaeg: 10-Dec-2014
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781491909706

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

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 lifecycle
  • Use storyboards to design adaptive interfaces
  • Explore graphics systems, including the built-in 2D and 3D game frameworks
  • Display video and audio with AVFoundation
  • 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
  • Build apps that let users create, edit, and work with documents
  • Use MapKit, Core Location, and Core Motion to interact with the world
Preface xi
1 Cocoa Development Tools 1(20)
The Mac and iOS Developer Programs
1(3)
Registering for a Developer Program
2(1)
Downloading Xcode
3(1)
Creating Your First Project with Xcode
4(9)
The Xcode Interface
7(6)
Developing a Simple Swift Application
13(4)
Designing the Interface
13(2)
Connecting the Code
15(2)
Using the iOS Simulator
17(2)
Testing iOS Apps with TestFlight
19(2)
2 Programming with Swift 21(42)
The Swift Programming Language
21(2)
Playgrounds
23(1)
Variables and Constants
24(2)
Types
26(4)
Tuples
28(1)
Arrays
28(1)
Dictionaries
29(1)
Control Flow
30(5)
Switches
33(2)
Functions and Closures
35(5)
Using Functions as Variables
37(2)
Closures
39(1)
Objects
40(12)
Inheritance
42(1)
Initialization and Deinitialization
42(2)
Properties
44(2)
Protocols
46(1)
Extensions
47(2)
Access Control
49(1)
Operators
50(1)
Generics
51(1)
Interoperating with Objective-C
52(1)
Using Objective-C and Swift in the Same Project
52(2)
Using Swift Objects in Objective-C
53(1)
Using Objective-C Objects in Swift
53(1)
Modules
54(1)
Memory Management
54(1)
Working with Strings
55(2)
Comparing Strings
56(1)
Searching Strings
57(1)
Data
57(2)
Loading Data from Files and URLs
57(1)
Serialization and Deserialization
58(1)
Design Patterns in Cocoa
59(4)
Model-View-Controller
59(1)
Delegation
60(3)
3 Applications on OS X and iOS 63(18)
What Is an Application?
63(5)
Applications, Frameworks, Utilities, and More
64(1)
What Are Apps Composed Of?
65(2)
Using NSBundle to Find Resources in Applications
67(1)
The Application Life Cycle
68(7)
OS X Applications
68(2)
iOS Applications
70(5)
The Application Sandbox
75(3)
Application Restrictions
76(2)
Notifications with NSNotification
78(3)
4 Graphical User Interfaces 81(26)
Interfaces in OS X and iOS
81(1)
MVC and Application Design
82(1)
Nib Files and Storyboards
82(7)
Structure of a Nib File
83(3)
Storyboards
86(1)
Outlets and Actions
87(1)
How Nib Files and Storyboards Are Loaded
88(1)
Constructing an Interface
89(3)
Guidelines and Constraints
90(2)
Building an App with Nibs and Constraints
92(3)
Interfaces on iOS
95(3)
Launch Screen Files
98(1)
UI Dynamics
98(3)
UI and Gravity
99(1)
Snapping UI
100(1)
Core Animation
101(6)
Layers
102(1)
Animations
103(4)
5 Closures and Operation Queues 107(10)
Closures in Cocoa
108(1)
Concurrency with Operation Queues
109(1)
Operation Queues and NSOperation
110(1)
Performing Work on Operation Queues
110(1)
Putting It All Together
111(6)
6 Drawing Graphics in Views 117(24)
How Drawing Works
117(2)
The Pixel Grid
119(3)
Retina Displays
120(1)
Pixels and Screen Points
121(1)
Drawing in Views
122(2)
Frame Rectangles
122(1)
Bounds Rectangles
123(1)
Building a Custom View
124(17)
Filling with a Solid Color
125(1)
Working with Paths
126(2)
Creating Custom Paths
128(2)
Multiple Subpaths
130(1)
Shadows
131(3)
Gradients
134(3)
Transforms
137(4)
7 SpriteKit 141(24)
SpriteKit's Architecture
141(1)
Making an App That Uses SpriteKit
142(1)
Working with SpriteKit Scenes
143(2)
SpriteKit Nodes
145(2)
Putting Sprites in Scenes
147(1)
Responding to Touches
148(1)
Working with Textures
149(1)
Texture Atlases
150(1)
Working with Text
151(1)
Animating Content with Actions
152(1)
Using Shape Nodes
153(2)
Using Image Effect Nodes
155(1)
Adding Physics to SpriteKit Objects
156(1)
Adding Joints to SpriteKit Objects
157(1)
Lighting SpriteKit Scenes
158(1)
Constraints
159(1)
Using Shaders in SpriteKit
159(3)
Using SpriteKit Editor
162(3)
8 SceneKit 165(26)
SceneKit Structure
166(1)
Working with SceneKit
167(1)
Adding a SceneKit View
167(1)
Adding a Scene
168(1)
Adding a Camera
169(1)
Adding a 3D Object
170(1)
Adding Lights
171(1)
Animating Content in the Scene
172(2)
Creating Text Geometry
174(2)
Combining Animations
175(1)
Working with Materials
176(4)
Normal Mapping
178(2)
Hit Testing
180(3)
Constraints
183(1)
Loading Data from COLLADA Files
184(3)
Adding Physics to the Scene
187(4)
9 Audio and Video 191(20)
AV Foundation
191(1)
Playing Video with AVPlayer
192(10)
AVPlayerLayer
193(1)
Putting It Together
193(4)
AVKit
197(2)
AVKit on iOS
199(2)
Playing Sound with AVAudioPlayer
201(1)
Speech Synthesis
202(1)
Working with the Photo Library
203(8)
Capturing Photos and Video from the Camera
204(2)
Building a Photo Application
206(3)
The Photo Library
209(2)
10 iCloud and Data Storage 211(32)
Preferences
211(3)
Registering Default Preferences
212(1)
Accessing Preferences
213(1)
Setting Preferences
213(1)
Working with the Filesystem
214(5)
Using NSFileManager
215(4)
File Storage Locations
219(1)
Working with the Sandbox
219(3)
Enabling Sandboxing
219(1)
Open and Save Panels
220(1)
Security-Scoped Bookmarks
221(1)
iCloud
222(1)
What iCloud Stores
223(1)
Setting Up for iCloud
224(1)
Testing Whether iCloud Works
224(1)
Storing Settings
225(5)
Handling External Changes
226(1)
The iOS Counterpart
227(3)
iCloud Storage
230(7)
iCloud Storage on OS X
230(5)
iCloud Storage on iOS
235(2)
Document Pickers
237(4)
Using iCloud Well
241(2)
11 Cocoa Bindings 243(14)
Binding Views to Models
243(1)
A Simple Bindings App
244(3)
Binding to Controllers
247(1)
Array and Object Controllers
248(1)
A More Complex Bindings App
249(8)
12 Table Views and Collection Views 257(20)
Data Sources and Delegates
257(1)
Table Views
258(14)
UITableView on iOS
258(8)
NSTableView on OS X
266(6)
Collection Views
272(5)
UICollectionView on iOS
272(5)
13 Document-Based Applications 277(18)
The NSDocument and UlDocument Classes
278(1)
Document Objects in MVC
278(2)
Kinds of Documents
279(1)
The Role of Documents
280(1)
Document-Based Applications on OS X
280(8)
Autosaving and Versions
281(1)
Representing Documents with NSDocument
281(1)
Saving Simple Data
282(2)
Saving More Complex Data
284(4)
Document-Based Applications on iOS
288(7)
14 Networking 295(14)
Connections
295(4)
NSURL
296(1)
NSURLRequest
297(1)
NSURLSession
298(1)
NSURLResponse and NSHTTPURLResponse
298(1)
Building a Networked Application
299(2)
Bonjour Service Discovery
301(2)
Browsing for Shared iTunes Libraries
301(2)
Multipeer Connectivity
303(6)
15 Working with the Real World 309(42)
Working with Location
309(7)
Location Hardware
310(2)
The Core Location Framework
312(1)
Working with Core Location
313(3)
Geocoding
316(3)
Region Monitoring and iBeacons
319(3)
Locations and Privacy
322(1)
Maps
322(4)
Using Maps
322(1)
Annotating Maps
323(1)
Maps and Overlays
324(2)
Device Motion
326(7)
Working with Core Motion
327(4)
Using the Built-in Altimeter
331(1)
Using the Pedometer
332(1)
Printing Documents
333(3)
Printing on OS X
334(1)
Printing on iOS
335(1)
Game Controllers
336(2)
App Nap
338(2)
Authenticating Using Touch ID
340(4)
Handoff
344(7)
16 EventKit 351(12)
Understanding Events
351(1)
Accessing the Event Store
352(1)
Accessing Calendars
353(1)
Accessing Events
354(1)
Working with Events
355(1)
Building an Events Application
356(5)
User Privacy
361(2)
17 Instruments and the Debugger 363(26)
Getting Started with Instruments
364(6)
The Instruments Interface
366(1)
Observing Data
367(1)
Adding Instruments from the Library
368(2)
Fixing Problems Using Instruments
370(4)
Retain Cycles and Leaks
374(2)
Using the Debugger
376(4)
Setting Breakpoints
376(3)
Inspecting Memory Contents
379(1)
Working with the Debugger Console
380(1)
View Debugging
380(3)
The Testing Framework
383(3)
Writing Tests
383(2)
Writing Asynchronous Tests
385(1)
Performance-Testing Blocks with Tests
385(1)
Debug Gauges
386(1)
Performance Optimization
386(3)
18 Sharing and Notifications 389(22)
Sharing
389(3)
Sharing on iOS
392(3)
Sharing on OS X
395(1)
Notifications
395(9)
Registering Notification Settings
396(6)
Push Notifications
402(1)
What Happens When a Notification Arrives
403(1)
Sending Push Notifications
404(1)
Setting Up to Receive Push Notifications
405(1)
Receiving Push Notifications
406(2)
Local Notifications
408(3)
19 Nonstandard Apps 411(12)
Command-Line Tools
411(1)
Preference Panes
412(5)
How Preference Panes Work
413(1)
Preference Domains
414(1)
Building a Sample Preference Pane
415(2)
Status Bar Items
417(2)
Building a Status Bar App
417(2)
iOS Apps with Multiple Windows
419(4)
20 Working with Text 423(20)
Internationalization and Localization
423(9)
Strings Files
423(1)
Creating a Sample Localized Application
424(8)
Formatting Data with NSFormatter
432(3)
Testing Different Locales
434(1)
Formatting Numbers, Lengths, Mass, Energy, and Data
435(3)
NSNumberFormatter
435(1)
NSEnergyFormatter, NSMassFormatter, and NSLengthFormatter
436(1)
NSByteCountFormatter
437(1)
Detecting Data with NSDataDetector
438(2)
TextKit
440(3)
Index 443
Jon Manning is the co-founder of Secret Lab, an independent game development studio based in Hobart, Tasmania, Australia. Jon Manning is a game designer and programmer who's worked on all kinds of projects, ranging from iPad games for children to instant messaging clients. Jon is about to submit a PhD exploring the manipulation of online social networks.Jon is the world's biggest Horse_ebooks fan (https: //twitter.com/Horse_ebooks), and can be found on Twitter as @desplesda.