售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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
1. 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
2. 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
3. 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
4. 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
5. 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
6. 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
7. 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
8. 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
9. 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
Updating the header layout
Updating the table details section layout
Updating the No Reviews Layout
Updating the Reviews layout
Updating the Map section layout
Summary
15. iMessages
Understanding iMessages
Creating our extension
Updating our assets
Implementing our Messages UI
Adding Auto Layout to our cell
Creating a framework
Connecting our message cell
Showing restaurants
Sending reservations
Summary
16. Notifications
Starting with the basics
Getting permission
Setting up notifications
Showing notifications
Customizing our notifications
Embedding images
Adding buttons
Custom UI in notifications
Summary
17. Just a Peek
Adding 3D Touch quick actions
Adding favorites
Creating a new model object
Updating our Core Data manager
Summary
18. Beta and Store Submission
Creating a bundle identifier
Creating a Certificate Signing Request
Creating production and development certificates
Creating a Production Provisioning Profile
Creating a Development Provisioning Profile
Creating the App Store Listing
Creating an archive build
Internal and External Testing
Internal testing
External testing
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜