iOS 10 programming for beginners

895 90 0
iOS 10 programming for beginners

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

iOS 10 Programming for Beginners Table of Contents iOS 10 Programming for Beginners Credits About the Author About the Reviewer www.PacktPub.com eBooks, discount offers, and more Why subscribe? Customer Feedback Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading theexample code Downloading the color images of this book Errata Piracy Questions Getting Familiar with Xcode Getting started The Xcode interface Navigator panel Standard editor Utilities panel Debug panel Toolbar Generic iOS Device iOS device Window Pane Controls Summary Building a Foundation with Swift Playgrounds – an interactive coding environment Data types – where it all starts String Integer data type Floating-point numbers Booleans Variables and constants – where data is held Creating a variable with a String Creating a variable with an Integer (Int) Debug and print() – detecting your bugs Adding floating-point numbers Creating a Boolean Hungarian notation Why constants versus variables? Comments – leaving yourself notes or reminders Type safety and type inference Concatenating strings String interpolation Operations with our Integers Increment and decrement Comparison operators If-Statements – having fun with logic statements Optionals and Optional Bindings Why optionals? Functions Let's Work Summary Digging Deeper Creating a Playground project Ranges Closed Range Half closed Range Control flow The for…in loop The while loop The repeat…while loop Summary Digging into Collections Arrays Creating an empty array Creating an array with initial values Creating a mutable array Adding items to an array Checking the number of elements in an array Checking for an empty array Retrieving a value from an array Iterating over an array Removing items from an array Dictionaries Creating a dictionary Adding and updating dictionary elements Accessing an item in a dictionary Iterating over dictionary values Iterating over dictionary keys Iterating over dictionary keys and values Checking the number of items in a dictionary Removing Items from a dictionary Sets Creating an empty set Creating a set with an array literal Creating a mutable set Adding items into a set Checking if a set contains an item Iterating over a set Intersecting two sets Joining two sets Removing items from a Set Summary Starting the UI Setup Useful terms View Controller Table View Controller Collection View Controller Navigation Controller Tab Bar Controller Storyboard Segue Auto layout Model View Controller (MVC) App Tour Explore tab Locations Restaurant listings Restaurant detail Map tab Project setup Creating a new project Creating our files Storyboard setup Adding our App assets Storyboards Creating our launch screen Adding a Navigation Controller Creating a custom title view Adding a container Using Stack Views Adding a Custom Label and an Arrow to Our Custom Title View Summary Setting Up UI Design clean up Adding a Clear Background to the Custom Title View Updating the UIStackView Updating our Arrow Updating our Label Adding a Button Collection View Adding a Modal Map Kit View Fixing the Crash Refactoring the Storyboard Creating a New Storyboard for the Explore Tab Creating a New Storyboard for the Map Tab Folder Setup Organizing folders Setting up Global Settings Breaking Down our App Delegate Summary Getting Started with the Grid Understanding the Model View Controller architecture Model View Controller Getting familiar with the setup Classes and Structures Controllers and Classes Creating our Controller Understanding Collection View Controllers and Collection View Cells Getting Data into Collection View Understanding the Data Source Updating the Grid Model ExploreData.plist ExploreItem.swift ExploreDataManager.Swift Getting Data CollectionView Cell Connecting to Our Cell Hooking up Our UI with IBOutlets Cell Selection Restaurant Listing Summary Getting Started with the List Updating UI in Storyboard Updating Bar Button Items Unwinding our cancel button Adding Our First Table View Updating Our Edges Creating Our View Controller Class Connecting our TableView with our Location View Controller Adding the Data Source and Delegate Creating a Prototype Cell Digging into Our Table View code Adding Locations to Our Table View Creating Our First Property List (plist) Adding Data to Our Property List Creating Our Location Data Manager Working with Our Data Manager Summary Working More with Lists Creating our Restaurant detail Setting up our static Table View Exploring Restaurant details Creating our section headers Adding our labels Address section Creating Reviews Reservations Adding reservation times Reservation information Reservation header Summary 10 Where Are We? Setting up map annotations What is an MKAnnotation? Creating a restaurant annotation Creating our Map Data Manager Creating a base class Refactoring ExploreDataManager Creating and adding annotations Creating our Map View Controller Creating custom annotations Refactoring restaurant detail Creating a Storyboard reference Map to restaurant detail Passing data to Restaurant detail Organizing your code Summary 11 Where's My Data? Creating an API Manager What is an API? Understanding a JSON file Exploring the API Manager file Location list Selecting a location Passing a selected location back to Explore View Getting the last selected location Passing location and cuisine to the restaurant list Building our restaurant list Updating our background Updating our restaurant list cell Positioning elements in our restaurant list cell Adding auto layout to our restaurant list cell Creating our restaurant cell class Setting up restaurant list cell outlets Creating RestaurantDataManager Displaying data in Restaurant list cell Restaurant details Displaying data in the Restaurant Detail view Passing data to our Restaurant List View Controller Map update Challenge yourself Summary 12 Foodie Reviews Getting started with reviews Setting up our table view controllers Creating reviews Setting up the Review Storyboard Updating the Review Cells Positioning UI elements Adding Auto Layout for creating reviews Adding Ratings View Adding Auto Layout for Ratings View Adding our Photo Filter View Adding Auto Layout for the Photo Filter View Presenting our Views as Modals Setting up our unwind segues Hooking up our unwind segues Working with filters Creating our Filter Scroller Creating our apply Filter View Controller Creating review images Summary 13 Saving Reviews What is Core Data? NSManagedObjectModel NSManagedObjectContext NSPersistentStoreCoordinator Creating a data model Entity auto-generation Review item Core Data Manager Creating star ratings Setting up the cell UI Adding Auto Layout Adding Review List extension Summary 14 Universal Explore Restaurant listing Updating restaurant details C Cancel Button unwinding / Unwinding our cancel button Certificate Signing Request creating / Creating a Certificate Signing Request clear background adding, to custom title view / Adding a Clear Background to the Custom Title View closed range / Closed Range code organizing / Organizing your code Collection View Controller about / Collection View Controller comments about / Comments – leaving yourself notes or reminders adding, to code / Comments – leaving yourself notes or reminders constants about / Variables and constants – where data is held versus variables / Why constants versus variables? control flow about / Control flow for…in loop / The for…in loop while loop / The while loop repeat while loop / The repeat…while loop Core Data about / What is Core Data? NSManagedObjectModel / NSManagedObjectModel NSManagedObjectContext / NSManagedObjectContext NSPersistentStoreCoordinator / NSPersistentStoreCoordinator Core Data Manager / Core Data Manager cuisine passing, to Restaurant list / Passing location and cuisine to the restaurant list Custom Label adding, to custom Title view / Adding a Custom Label and an Arrow to Our Custom Title View custom Title view creating / Creating a custom title view container, adding / Adding a container Custom Label, adding to / Adding a Custom Label and an Arrow to Our Custom Title View arrow, adding to / Adding a Custom Label and an Arrow to Our Custom Title View custom title view clear background, adding to / Adding a Clear Background to the Custom Title View custom UI adding, to notifications / Custom UI in notifications D 3D touch quick actions adding / Adding 3D Touch quick actions data displaying, in Restaurant list cell / Displaying data in Restaurant list cell displaying, in Restaurant Detail view / Displaying data in the Restaurant Detail view passing, to Restaurant List View Controller / Passing data to our Restaurant List View Controller data model creating / Creating a data model entity auto-generation / Entity auto-generation items, reviewing / Review item data types about / Data types – where it all starts string / String integer data type / Integer data type floating-point numbers / Floating-point numbers Booleans (bools) / Booleans Debug panel, Xcode interface / Debug panel Design Clean Up about / Design clean up clear background, adding to custom title view / Adding a Clear Background to the Custom Title View UIStackView, updating / Updating the UIStackView arrow, updating / Updating our Arrow label, updating / Updating our Label button, adding / Adding a Button Collection View Controllers / Collection View modal, adding / Adding a Modal map kit view / Map Kit View crash, fixing / Fixing the Crash development provisioning profile creating / Creating a Development Provisioning Profile dictionary about / Dictionaries creating / Creating a dictionary item, accessing in / Accessing an item in a dictionary number of items, checking / Checking the number of items in a dictionary items, removing from / Removing Items from a dictionary dictionary elements adding / Adding and updating dictionary elements updating / Adding and updating dictionary elements dictionary keys iterating over / Iterating over dictionary keys, Iterating over dictionary keys and values dictionary values iterating over / Iterating over dictionary values, Iterating over dictionary keys and values dynamic cells / Adding the Data Source and Delegate E elements positioning, in Restaurant list cell / Positioning elements in our restaurant list cell empty array creating / Creating an empty array checking for / Checking for an empty array empty set creating / Creating an empty set entity auto-generation / Entity auto-generation Explore tab about / Explore tab storyboard, creating for / Creating a New Storyboard for the Explore Tab external testing / Internal and External Testing, External testing F favorites, adding within Restaurant List View about / Adding favorites new Model Object, adding / Creating a new model object Core Data manager, updating / Updating our Core Data manager files creating / Creating our files filters working with / Working with filters apply Filter View Controller, creating / Creating our apply Filter View Controller filter scroller creating / Creating our Filter Scroller floating-point numbers about / Floating-point numbers adding / Adding floating-point numbers for in loop / The for…in loop functions about / Functions creating / Functions G Generic iOS Device, Xcode interface / Generic iOS Device H half-closed range / Half closed Range Hungarian notation / Hungarian notation I images embedding, in notifications / Embedding images iMessages about / Understanding iMessages extension, creating / Creating our extension assets, updating / Updating our assets UI, implementing / Implementing our Messages UI auto layout, adding to cell / Adding Auto Layout to our cell framework, creating / Creating a framework Message Cell, connecting / Connecting our message cell restaurants, displaying / Showing restaurants reservations, sending / Sending reservations initial values array, creating with / Creating an array with initial values Integers (Ints) about / Integer data type variables, creating with / Creating a variable with an Integer (Int) internal testing / Internal and External Testing, Internal testing iOS device, Xcode interface / iOS device items adding, to arrays / Adding items to an array removing, from arrays / Removing items from an array accessing, in dictionary / Accessing an item in a dictionary removing, from dictionary / Removing Items from a dictionary adding, into set / Adding items into a set removing, from set / Removing items from a Set J JSON file about / Understanding a JSON file L location selecting / Selecting a location selected location, passing to Explore View / Passing a selected location back to Explore View last selected location, obtaining / Getting the last selected location passing, to Restaurant list / Passing location and cuisine to the restaurant list location list about / Location list Locations view about / Locations Location View Controller used, for connecting Table View / Connecting our TableView with our Location View Controller M Managed Object Context about / What is Core Data?, NSManagedObjectContext Managed Object Model about / NSManagedObjectModel map annotations setting up / Setting up map annotations MKAnnotation / What is an MKAnnotation? Map Data Manager creating / Creating our Map Data Manager base class, creating / Creating a base class ExploreDataManager, refactoring / Refactoring ExploreDataManager Map tab about / Map tab storyboard, creating for / Creating a New Storyboard for the Map Tab MKAnnotation about / What is an MKAnnotation? Restaurant annotation, creating / Creating a restaurant annotation Model developing / Model ExploreData.plist file / ExploreData.plist ExploreItem.swift file / ExploreItem.swift ExploreDataManager.Swift file / ExploreDataManager.Swift data, obtaining from plist / Getting Data Model View Controller (MVC) about / Model View Controller (MVC) Model View Controller (MVC) architecture about / Understanding the Model View Controller architecture, Controller Model camp / Model View camp / View Controller camp / Controller setup / Getting familiar with the setup classes and structures / Classes and Structures classes and controllers / Controllers and Classes file, creating in Controller folder / Creating our Controller CollectionView Controllers / Understanding Collection View Controllers and Collection View Cells CollectionView Cells / Understanding Collection View Controllers and Collection View Cells, CollectionView Cell data, displaying into CollectionView / Getting Data into Collection View data source / Understanding the Data Source grid, updating / Updating the Grid cell, connecting to / Connecting to Our Cell UI elements, hooking up with IBOutlets / Hooking up Our UI with IBOutlets mutable array creating / Creating a mutable array mutable set creating / Creating a mutable set N Navigation Controller about / Navigation Controller Navigator panel, Xcode interface / Navigator panel notifications basic notifications / Starting with the basics setting up / Setting up notifications displaying / Showing notifications customizing / Customizing our notifications images, embedding / Embedding images buttons, adding to / Adding buttons custom UI, adding to / Custom UI in notifications NSManagedObjectContext about / NSManagedObjectContext NSManagedObjectModel about / NSManagedObjectModel NSPersistentStoreCoordinator about / NSPersistentStoreCoordinator O operations, with Integers about / Operations with our Integers decrement / Increment and decrement increment / Increment and decrement comparison operators / Comparison operators if statement / If-Statements – having fun with logic statements optional bindings / Optionals and Optional Bindings optionals about / Optionals and Optional Bindings need for / Why optionals? option screen, Xcode / Getting started P permission obtaining / Getting permission Persistent Store Coordinator about / What is Core Data?, NSPersistentStoreCoordinator Playground project creating / Creating a Playground project Playgrounds about / Playgrounds – an interactive coding environment creating / Playgrounds – an interactive coding environment area / Playgrounds – an interactive coding environment print() using / Debug and print() – detecting your bugs Production and Development certificates creating / Creating production and development certificates production provisioning profile creating / Creating a Production Provisioning Profile project creating / Creating a new project project setup about / Project setup Property List (plist) creating / Creating Our First Property List (plist) data, adding / Adding Data to Our Property List Location Data Manager file, creating / Creating Our Location Data Manager Data Manager, working with / Working with Our Data Manager Protocol Oriented Programming (POP) / Working with filters R ranges about / Ranges closed range / Closed Range half-closed range / Half closed Range refactor about / Refactoring the Storyboard repeat while loop / The repeat…while loop reservations about / Reservations times, adding / Adding reservation times information section / Reservation information header / Reservation header Restaurant cell class creating / Creating our restaurant cell class RestaurantDataManager file creating / Creating RestaurantDataManager Restaurant detail about / Restaurant detail restaurant detail creating / Creating our Restaurant detail exploring / Exploring Restaurant details refactoring / Refactoring restaurant detail Storyboard reference, creating / Creating a Storyboard reference mapping / Map to restaurant detail data, parsing / Passing data to Restaurant detail Restaurant Details view map update, performing / Map update updating / Updating restaurant details header layout, updating / Updating the header layout Table Details Section layout, updating / Updating the table details section layout No Reviews Layout, updating / Updating the No Reviews Layout Reviews Layout, updating / Updating the Reviews layout Map Section Layout, updating / Updating the Map section layout Restaurant Detail view about / Restaurant details data, displaying in / Displaying data in the Restaurant Detail view Restaurant list location, passing to / Passing location and cuisine to the restaurant list cuisine, passing to / Passing location and cuisine to the restaurant list background, modifying / Updating our background restaurant list building / Building our restaurant list Restaurant list cell updating / Updating our restaurant list cell elements, positioning in / Positioning elements in our restaurant list cell auto layout, adding to / Adding auto layout to our restaurant list cell data, displaying in / Displaying data in Restaurant list cell Restaurant List cell outlets setting up / Setting up restaurant list cell outlets Restaurant listing cell, about / Restaurant Listing restaurant listing page / Restaurant listing Restaurant listings about / Restaurant listings Restaurant List View Controller data, passing to / Passing data to our Restaurant List View Controller reviews creating / Creating Reviews, Creating reviews Reviews section about / Getting started with reviews Review Storyboard, setting up / Setting up the Review Storyboard Review Cells, updating / Updating the Review Cells UI elements, positioning / Positioning UI elements auto layout, adding / Adding Auto Layout for creating reviews Ratings View screen, adding / Adding Ratings View auto layout, adding for Ratings View section / Adding Auto Layout for Ratings View Photo Filter View, adding / Adding our Photo Filter View auto layout, adding for Photo Filter View / Adding Auto Layout for the Photo Filter View views, presenting as modals / Presenting our Views as Modals Unwind Segues, setting up / Setting up our unwind segues Unwind Segues, hooking up / Hooking up our unwind segues review images, creating / Creating review images S segue about / Segue set about / Sets empty set, creating / Creating an empty set creating, with array literal / Creating a set with an array literal mutable set, creating / Creating a mutable set items, adding into / Adding items into a set items, checking in / Checking if a set contains an item iterating over / Iterating over a set two sets, intersecting / Intersecting two sets two sets, joining / Joining two sets items, removing from / Removing items from a Set Stack Views using / Using Stack Views Standard editor, Xcode interface / Standard editor star ratings creating / Creating star ratings cell UI, setting up / Setting up the cell UI auto layout, adding / Adding Auto Layout review list extension, adding / Adding Review List extension static Table View setting up / Setting up our static Table View restaurant details, exploring / Exploring Restaurant details section headers, creating / Creating our section headers labels, adding / Adding our labels Storyboard UI, updating / Updating UI in Storyboard Bar Button Items, updating / Updating Bar Button Items Cancel Button, unwinding / Unwinding our cancel button storyboard about / Storyboard, Storyboards, Refactoring the Storyboard setting up / Storyboard setup App assets, adding / Adding our App assets launch screen, creating / Creating our launch screen Navigation Controller, adding / Adding a Navigation Controller refactoring / Refactoring the Storyboard creating, for Explore tab / Creating a New Storyboard for the Explore Tab creating, for Map tab / Creating a New Storyboard for the Map Tab project folders, setting up / Folder Setup folders, organizing / Organizing folders global settings, setting up / Setting up Global Settings storyboard reference about / Refactoring the Storyboard string interpolation / String interpolation strings about / String variables, creating with / Creating a variable with a String concatenating / Concatenating strings Swift types / Classes and Structures T Tab Bar Controller about / Tab Bar Controller Table View adding / Adding Our First Table View Edges, updating / Updating Our Edges View Controller Class, creating / Creating Our View Controller Class connecting, with Location View Controller / Connecting our TableView with our Location View Controller data source, adding / Adding the Data Source and Delegate delegate, adding / Adding the Data Source and Delegate Prototype Cell, creating / Creating a Prototype Cell code, exploring / Digging into Our Table View code locations, adding / Adding Locations to Our Table View Table View Controller about / Table View Controller table view controllers setting up / Setting up our table view controllers TestFlight / Internal and External Testing Toolbar, Xcode interface / Toolbar type inference / Type safety and type inference type safety / Type safety and type inference U UI elements, hooking up with IBOutlets about / Hooking up Our UI with IBOutlets cell, selecting / Cell Selection UIStackView updating / Updating the UIStackView Utilities panel, Xcode interface / Utilities panel V value retrieving, from array / Retrieving a value from an array variables about / Variables and constants – where data is held creating, with strings / Creating a variable with a String creating, with Integer (Int) / Creating a variable with an Integer (Int) versus constants / Why constants versus variables? View Controller about / View Controller W while loop / The while loop Window Pane Controls, Xcode interface / Window Pane Controls X Xcode downloading / Getting started installing / Getting started launching / Getting started option screen / Getting started Xcode interface about / The Xcode interface Navigator panel / Navigator panel Standard editor / Standard editor Utilities panel / Utilities panel Debug panel / Debug panel Toolbar / Toolbar Generic iOS Device / Generic iOS Device iOS device / iOS device Window Pane Controls / Window Pane Controls XML Interface Builder (xib) file / Creating star ratings Y YELP about / What is an API? .. .iOS 10 Programming for Beginners Table of Contents iOS 10 Programming for Beginners Credits About the Author About the Reviewer www.PacktPub.com... and External Testing Internal testing External testing Summary Index iOS 10 Programming for Beginners iOS 10 Programming for Beginners Copyright © 2016 Packt Publishing All rights reserved No part... 7-Zip for Windows Zipeg / iZip / UnRarX for Mac 7-Zip / PeaZip for Linux The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing /iOS- 10- Programming- for- Beginners. We

Ngày đăng: 15/09/2020, 11:37

Mục lục

    iOS 10 Programming for Beginners

    iOS 10 Programming for Beginners

    eBooks, discount offers, and more

    What this book covers

    What you need for this book

    Who this book is for

    Downloading the color images of this book

    1. Getting Familiar with Xcode

    2. Building a Foundation with Swift

    Playgrounds – an interactive coding environment

Tài liệu cùng người dùng

Tài liệu liên quan