Learn how to code for the iMac, Mac mini, Mac Pro, and MacBook using Swift, Apple's hottest programming language.Fully updated to cover the new MacBook Touch Bar, __macOS Programming for Absolute Beginners__ will not only teach complete programming novices how to write macOS programs, but it can also help experienced programmers moving to the Mac for the first time. You will learn the principles of programming, how to use Swift and Xcode, and how to combine your knowledge into writing macOS programs. If you've always wanted to learn coding but felt stymied by the limitation of simplistic programming languages or intimidated by professional but complicated programming languages, then you'll want to learn Swift. Swift is your gateway to both Mac and iOS app development while being powerful and easy to learn at the same time, and __macOS Programming for Absolute Beginners__ is the perfect place to start - add it to your library today.**What You'll Learn** * Master the basic principles of object-oriented programming * Use Xcode, the main programming tool used for both macOS and iOS development * See what makes Swift unique and powerful as a programming language and why you should learn it * Create macOS programs using Swift and Xcode * Apply interface principles that follow Apple's Human Interface Guidelines * Take advantage of the new Touch Bar **Who This Book Is For**People who want to learn programming for the first time and for experienced programmers wanting to learn Xcode and the Mac for the first time. Learn how to code for the iMac, Mac mini, Mac Pro, and MacBook using Swift, Apple's hottest programming language. Fully updated to cover the new MacBook Touch Bar, macOS Programming for Absolute Beginners will not only teach complete programming novices how to write macOS programs, but it can also help experienced programmers moving to the Mac for the first time. You will learn the principles of programming, how to use Swift and Xcode, and how to combine your knowledge into writing macOS programs. If you've always wanted to learn coding but felt stymied by the limitation of simplistic programming languages or intimidated by professional but complicated programming languages, then you'll want to learn Swift. Swift is your gateway to both Mac and iOS app development while being powerful and easy to learn at the same time, and macOS Programming for Absolute Beginners is the perfect place to start - add it to your library today. What You'll Learn Master the basic principles of object-oriented programming Use Xcode, the main programming tool used for both macOS and iOS development See what makes Swift unique and powerful as a programming language and why you should learn it Create macOS programs using Swift and Xcode Apply interface principles that follow Apple's Human Interface Guidelines Take advantage of the new Touch Bar Who This Book Is For People who want to learn programming for the first time and for experienced programmers wanting to learn Xcode and the Mac for the first time. Front Matter....Pages i-xxvi Understanding Programming....Pages 1-21 Getting to Know Xcode 8....Pages 23-47 The Basics of Creating a Mac Program....Pages 49-76 Getting Help....Pages 77-98 Learning Swift with Playgrounds....Pages 99-124 Manipulating Numbers and Strings....Pages 125-137 Making Decisions with Branches....Pages 139-169 Repeating Code with Loops....Pages 171-195 Arrays and Dictionaries....Pages 197-219 Tuples and Sets....Pages 221-234 Storing Code in Functions....Pages 235-248 Defining Custom Data Types....Pages 249-266 Creating Classes and Objects....Pages 267-293 Inheritance, Polymorphism, and Extending Classes....Pages 295-332 Creating a User Interface....Pages 333-366 Working with Storyboards....Pages 367-387 Choosing Commands with Buttons....Pages 389-414 Making Choices with Radio Buttons, Check Boxes, Date Pickers, and Sliders....Pages 415-436 Using Text with Labels, Text Fields, and Combo Boxes....Pages 437-460 Designing a User Interface with Constraints....Pages 461-480 Using Alerts and Panels....Pages 481-501 Creating Pull-Down Menus....Pages 503-529 Programming the Touch Bar....Pages 531-548 Protocol-Oriented Programming....Pages 549-568 Defensive Programming....Pages 569-583 Simplifying User Interface Design....Pages 585-600 Debugging Your Programs....Pages 601-623 Planning a Program Before and After Coding....Pages 625-640 Back Matter....Pages 641-647