Swift by Example

Packt Publishing Limited
  • 1. Auflage
  • |
  • erschienen am 19. Juni 2015
  • |
  • 284 Seiten
E-Book | ePUB mit Adobe DRM | Systemvoraussetzungen
978-1-78528-849-4 (ISBN)
When Apple announced Swift at the WWDC, the iOS developer community became excited about the opportunities to improve the way in which they build iOS apps. Swift is a user-friendly language with a smooth learning curve; it is safe, robust, and flexible, and it introduces new ways to solve old problems.Swift by Example is a fast-paced, practical guide that shows you how to develop iOS apps using Swift. Through the development of six different apps, you'll learn how to use either the right feature of the language or the right tool to solve a given problem.By the end of the book you will be able to build well-designed apps, effectively use AutoLayout, and develop a video game.
  • Englisch
  • Birmingham
  • |
  • Großbritannien
978-1-78528-849-4 (9781785288494)
1785288490 (1785288490)
weitere Ausgaben werden ermittelt
Giordano Scalzo is a developer with 20 years of programming experience since the days of the ZX Spectrum. He has worked using C++, Java, .NET, Ruby, Python, and a ton of other languages whose names he has forgotten.
After several years of backend development, over the past 5 years, he has developed extensively for iOS, releasing more than 20 apps-apps that he wrote for clients, enterprises, or himself.
Currently, Giordano is a contractor in London, where he delivers code for iOS through his company, Effective Code (http://effectivecode.co.uk), aiming at quality and reliability. In his spare time, when he is not crafting retro game clones for iOS, he writes his thoughts at http://giordanoscalzo.com.
  • Cover
  • Copyright
  • Credits
  • About the Author
  • About the Reviewers
  • www.PacktPub.com
  • Table of Contents
  • Preface
  • Chapter 1: Welcome to the World of Swift
  • The first look at Swift
  • Let's go to the playground
  • The building blocks - variables and constants
  • Collect variables in containers
  • Controlling the flow
  • Transforming the values using functions
  • Structs - custom compounds type
  • Classes - common behavior objects
  • Loose coupling with protocols
  • Check the existence of an optionals value
  • Enumerations on steroids
  • A Guess the Number app in Swift
  • The app is.
  • Building a skeleton app
  • Adding the graphic components
  • Connecting the dots
  • Adding the code
  • Summary
  • Chapter 2: A Memory Game in Swift
  • The app is.
  • Building the skeleton of the app
  • The menu screen
  • Implementing the basic menu screen
  • Creating a nice menu screen
  • The game screen
  • The structure
  • Adding the CollectionView class
  • Sizing the components
  • Connecting the datasource and the delegate
  • Implementing a deck of cards
  • What we are expecting
  • The Card entity
  • Crafting the deck
  • Shuffling the deck
  • Finishing the deck
  • Put the cards on the table
  • Adding the assets
  • The CardCell structure
  • Handling touches
  • Finishing the game
  • Implementing the game logic
  • We got a pair
  • We played a wrong turn
  • Et voilà! The game is completed
  • Summary
  • Chapter 3: A TodoList App in Swift
  • The app is.
  • Building a skeleton app
  • Implementing an empty app
  • Adding third-party libraries with CocoaPods
  • Implementing the Todos ViewController
  • Building the Todos screen
  • Adding the entities
  • Implementing the datastore
  • Connecting the datastore and the ViewController
  • Configuring tableView
  • Implementing TodoViewCell
  • Swipe that cell!
  • Adding a Todo task
  • The add a Todo ViewController
  • Updating the datastore
  • Adding a list
  • Implementing ListViewCell
  • Building ListViewController
  • Updating the datastore
  • Where do we go from here?
  • Summary
  • Chapter 4: A Pretty Weather App
  • The app is.
  • Building the skeleton
  • Creating the project
  • Adding the assets
  • Implementing the UI
  • The UI in blocks
  • Completing the UI
  • CurrentWeatherView
  • WeatherHourlyForecastView
  • WeatherDaysForecastView
  • Blurring the background
  • Downloading the background image
  • Searching in Flickr
  • Geolocalising the app
  • Using CoreLocation
  • Retrieving the actual forecast
  • Getting the forecast from OpenWeatherMap
  • Rendering CurrentWeatherView
  • Rendering WeatherHourlyForecastView
  • Rendering WeatherDaysForecastView
  • Connecting to the server
  • Where do we go from here?
  • Summary
  • Chapter 5: Flappy Swift
  • The app is.
  • Building the skeleton of the app
  • Creating the project
  • Implementing the menu
  • A stage for a bird
  • SpriteKit in a nutshell
  • Explaining the code
  • Simulating a three-dimensional world using parallax
  • How to implement the scrolling
  • A flying bird
  • Adding the Bird node
  • Making the bird flap
  • Pipes!
  • Implementing the pipes node
  • Making the components interact
  • Setting up the collision detection engine
  • Completing the game
  • Colliding with the pipes
  • Adding the score
  • Adding a restarting popup
  • Summary
  • Chapter 6: Polishing Flappy Swift
  • Adding juiciness
  • Let there be sounds!
  • Playing the soundtrack
  • Shaking the screen!
  • Integrating with Game Center
  • What Game Center provides
  • Setting up Game Center
  • Creating an app record on iTunes Connect
  • Enabling Game Center
  • Creating fake user accounts to test Game Center
  • Authenticating a player
  • Summary
  • Chapter 7: Cube Runner
  • The app is.
  • Introduction to SceneKit
  • What is SceneKit?
  • Building an empty scene
  • Adding a green torus
  • Let there be light!
  • Let's make it move!
  • Implementing Cube Runner
  • The game skeleton
  • Implementing the menu
  • Flying in a 3D world
  • Setting up the scene
  • Adding the fighter
  • Texturing the world
  • Make it move
  • Adding the cubes
  • Adding more obstacles
  • Adding a few touches
  • The score
  • Let's add the music
  • Summary
  • Chapter 8: Completing Cube Runner
  • Making it a real game
  • Detecting collisions
  • Game Over!
  • Adding the juice
  • Game Center
  • Summary
  • Index

Dateiformat: EPUB
Kopierschutz: Adobe-DRM (Digital Rights Management)


Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat EPUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Weitere Informationen finden Sie in unserer E-Book Hilfe.

Download (sofort verfügbar)

32,73 €
inkl. 19% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe DRM
siehe Systemvoraussetzungen
E-Book bestellen

Unsere Web-Seiten verwenden Cookies. Mit der Nutzung dieser Web-Seiten erklären Sie sich damit einverstanden. Mehr Informationen finden Sie in unserem Datenschutzhinweis. Ok