Liknande böcker
Swift for the Really Impatient
Bok av Matt Henderson
Swift for the Really Impatient is the perfect jumpstart to the Swift language for every experienced Objective-C developer. Leading iOS and OS X developers Matt Henderson and Dave Wood help you take full advantage of Swifts powerful innovations, without wasting time on basics you already know.
Through expert code examples and crystal-clear explanations, Henderson and Wood reveal how Swift features improve on Objective-C and show how to make the most of them. Youll quickly master Swift-er techniques for using objects, classes, optionals, generics, functions, closures, and more. Each chapter includes hands-on exercises designed to reinforce and deepen your skills.
Youll learn how to re-implement common Objective-C programming solutions in Swift, improving code clarity, power, and performance on both desktop and mobile devices. And, because you probably wont (or cant) abandon Objective-C anytime soon, youll discover how to use both languages together, smoothly integrate Swift into existing projects and workflows, and gradually move your current code base into the future. Coverage includes
Using Swifts new patterns and concise, expressive syntax to produce safer, more reliable codeLeveraging the surprising power of Swifts data structuresUtilizing Swifts type system to help prevent errors common in other languagesUsing optionals to correctly handle invalid, missing, or unknown valuesImplementing generics to reduce duplication, improve power, and simplify maintenanceInteracting with C and Objective-C APIs Abstracting functionality for reusable code while maintaining type safetyIsolating code in clean, flexible, low-overhead closuresCombining Swift with Objective-C in the same projectAvoiding gotchas when importing Objective-C classes in Swift projectsNesting types to improve code clarityCreating shared objects with singletonsManaging threading and concurrency with Swifts advanced Grand Central Dispatch (GCD) patterns