Beginning Swift Programming

Beginning Swift Programming
О книге

Start picking the five-string banjo like a pro with this definitive guide to bluegrass banjo! Whether you’re an absolute beginner or an experienced player, Bluegrass Banjo For Dummies gets you started off the right way and is your road map for mastering today’s most popular traditional and contemporary banjo picking styles. Online audio and video clips combine with the book’s clear step-by-step instructions to provide the most complete – and fun – banjo instruction experience available anywhere! Bluegrass banjo has never been more popular and is heard today not only in country and folk music, but in jazz, rock and country styles. Bluegrass Banjo For Dummies provides everything you need to know to play just about any kind of music on the five-string banjo by getting you started with the roll patterns essential to Scruggs style picking. You’ll then add left-hand techniques such as slides, hammer-ons and pull-offs, play great sounding licks and perform classic tunes like “Cripple Creek” and “Old Joe Clark.” You’ll navigate up the neck on the instrument as well as learn the essential skills you need to play with others in jam sessions and in bands. You’ll even tackle contemporary banjo styles using melodic and single-string scales and picking techniques. Choose a banjo and accessories that are just right for you and your budget. Put on your fingerpicks, find your optimal hand position and start playing with the help of online audio and video. Explore the fingerboard using melodic and single-string playing styles. Accompany others in different keys with roll patterns and chord vamping techniques. Keep your banjo sounding its best with practical and easy set up tips. Bill Evans is one of the world’s most popular banjo players and teachers, with over forty years of professional experience. In Bluegrass Banjo For Dummies, he shares the tips, secrets and shortcuts that have helped thousands of musicians, including many of today’s top young professionals, to become great banjo players.

Автор

Читать Beginning Swift Programming онлайн беплатно


Шрифт
Интервал

INTRODUCTION

The IT world is an extremely fast-changing one. Small changes occur nearly daily, and every now and then something big happens that changes the entire industry, if not the world. For example, the iPhone, introduced in 2007, transformed the mobile industry overnight, spearheading the new era of the smartphones. The launch of the iPad three years later (2010) changed the way we use our computers, causing many to predict that we are all entering the end of the PC era.

For a long time after its inception in the 1980s, Objective-C was used by NeXT for its NeXTStEP operating system. Mac OS X and iOS both derived from NeXTSTEP, and Objective-C was thus the natural choice of language to use for Mac OS and iOS development. Developers starting on iOS development often complain that Objective-C does not look like a modern programming language (such as Java or C#), and that it is difficult to write and requires spending significant amounts of time trying to learn. For seven years, Apple has improved on the language and the iOS framework, making life easier for developers by introducing helpful features, such as Automatic Reference Counting (ARC), which takes the drudgery out of memory management, and Storyboard, which simplifies the flow of your application user interface. However, this did not stop all the complaints. Furthermore, Apple needed a new language that could take iOS and Mac OS development to the next level.

In 2014, at the Apple World Wide Developers Conference (WWDC), Apple took many developers by surprise by introducing a new programming language: Swift. After seven years, Apple finally released a new language that can replace Objective-C! As you will see throughout this book, Swift is a modern programming language with an easy-to-read syntax, and strict enforcement of type safety.

This book was written with busy developers in mind. It aims to cut through all the technical jargon and dive straight into the language. Of course, the best way to learn any new language is to see code examples, and this book is loaded with them. To get the most from the material, therefore, I strongly recommend that you work through the examples in each chapter as you read them.

WHO THIS BOOK IS FOR

This book is targeted at both beginning iOS developers and experienced Objective-C developers. It assumes a foundation in programming, and an understanding of object-oriented programming (OOP) concepts is required to get the most out of this book.

All the code samples in the chapters were written and tested using the final version of Xcode 6. Because the Swift language is still evolving, expect to see minor tweaks by the time this book is on the market.

HOW THIS BOOK IS STRUCTURED

This book covers the key topics of Swift programming using Xcode 6. It is divided into the following 12 chapters:

Chapter 1, “Introduction to Swift,” covers the basic syntax of Swift and how to set up the development environment so that you can test your Swift code.

Chapter 2, “Data Types,” covers the basic data types supported in Swift and how to perform the common operations involving them. It also covers the new tuple and optional data types introduced in Swift.

Chapter 3, “Strings and Characters,” discusses how strings and characters are managed in Swift. In particular, special emphasis is placed on how the string type in Swift is backwardly compatible with the NSString in Objective-C. Also covered are things you need to be aware of when dealing with Unicode characters.

Chapter 4, “Basic Operators,” covers all the commonly used operators supported by Swift. In addition, it discusses the new range operators introduced in Swift.

Chapter 5, “Functions,” explains how functions are defined in Swift and the use of internal and external parameter names when calling them.

Chapter 6, “Collections,” covers the collection types supported in Swift – arrays and dictionaries.

Chapter 7, “Control Flow and Looping,” covers how to make decisions in Swift and how to use the looping statements to execute your Swift code repetitively.

Chapter 8, “Structures and Classes,” covers the basics of these programming constructs. It also demonstrates how to define properties and methods in your classes and structures.

Chapter 9, “Inheritance,” covers how to create subclasses in Swift and how access control rules affect the accessibility of a member. It also explains how to extend a class using the extension feature.

Chapter 10, “Closures,” covers everything you need to know about these blocks of functionality and demonstrates how they enable you to write versatile code in Swift.

Chapter 11, “Protocols and Delegates,” discusses a very important part of Swift’s design pattern. The protocol and delegate model is the basis on which most of the APIs in iOS and Mac OS programming are based.

Chapter 12, “Generics,” covers how Swift embraces this familiar programming concept, which enables the developer to write highly adaptable code that promotes sharing and reusing.

The appendix offers the answers to the exercises found at the end of each chapter.



Вам будет интересно