Swift Quick Syntax Reference

Ebook Details

Authors

Matthew Campbell

Year 2014
Pages 180
Publisher Apress
Language en
ISBN 9781484204405
File Size 3.78 MB
File Format PDF
Download Counter 1,271
Google Book Link
Download Now

Ebook Description

Swift Quick Syntax Reference is a condensed code and syntax reference to the new Apple Swift programming language, which is the alternative new programming language alongside Objective-C behind the APIs found in the Apple iOS SDK 8 and OS X Yosemite SDK. It presents the essential Swift syntax in a well-organized format that can be used as a handy reference. You won’t find any technical jargon, bloated samples, drawn out history lessons, or witty stories in this book. What you will find is a language reference that is concise, to the point, and highly accessible. The book is packed with useful information and is a must-have for any Swift programmer. In the Swift Quick Syntax Reference, you will find a concise reference to the Swift language syntax using the new Playgrounds. Playgrounds lets you type a line of code and the result appears immediately. What you’ll learn How to declare and print constants and variables What are and how to use numbers, strings, booleans, tuples, optionals, aliases, global and local variables, assertions and more How to use assignment, arithmetic, comparison, ternary conditional, range, and logical operators What are enumerations, arrays, dictionaries, loops, if/switch, control transfer, labeled statements How to do closures in Swift How to define or handle structures, classes, instances, class instance identity, properties, property observers, type properties, and type methods How to work with subscripts, inheritance, overriding methods/properties, initialization, type checking/casting, nested types, extensions, delegation, generics and more... Who this book is for This book is a quick, handy syntax reference for experienced Objective-C, Mac, and iOS programmers, and a concise, easily-digested introduction for other programmers new to Mac, iOS and of course Swift. Table of Contents1. Hello World 2. Declaring Constants and Variables 3. Printing Variables and Constants 4. Code Comments 5. Numbers 6. Strings 7. Booleans 8. Tuples 9. Optionals 10. Type Aliases 11. Global and Local Variables 12. Assertions 13. Assignment Operators 14. Arithmetic Operators 15. Comparison Operators 16. Ternary Conditional Operator 17. Range Operators 18. Logical Operators 19. Enumeration 20. Arrays 21. Dictionaries 22. Loops 23. if Statements 24. switch Statements 25. Control Transfer Statements 26. Labeled Statements 27. Functions 28. Nested Functions 29. Closures 30. Structures 31. Classes 32. Using Instances 33. Class Instance Identity Operators 34. Properties 35. Property Observers 36. Class Type Properties 37. Type Methods 38. Subscripts 39. Inheritance 40. Overriding Methods and Properties 41. Initialization 42. De-initialization 43. Type Casting 44. Nested Types 45. Extensions 46. Protocols 47. Delegation 48. Generics 49. Automatic Reference Counting