售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Learning iOS UI Development
Table of Contents
Learning iOS UI Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. UI Fundamentals
Exploring windows
The contents of windows
Configuring windows
Working with views
Defining the view's geometry
The bounds property
The frame property
The center property
UI hierarchy and views inheritance
Managing with the hierarchy
View and subview visibility
Hierarchy events
Notes about debug
Hands-on code
View drawing and life cycle
View controllers and views
Summary
2. UI Components Overview – UIKit
Exploring text elements
Presenting text with UILabel
Receiving user input with UITextField
Multiline text with UITextView
Notes about the keyboard
Keyboard events
Keyboard configuration
Exploring buttons and selectors
UIButton and user interaction
The target-action pattern
Boolean selection with UISwitch
Control customization
Selecting values with UISlider
Control customization
User choices through UISegmentedControl
Control customization
Selecting values with UIPickerView and UIDatePicker
Updating values with UIStepper
Control customization
View-based components
Showing progress with UIProgressView
Control customization
Working with UIActivityIndicatorView
Control customization
Introducing UIImageView and UIImage
Introducing UIScrollView
Managing and presenting structured data
Introducing UITableView
Introducing UICollectionView
The UIAppearance protocol
Hands-on code
Summary
3. Interface Builder, XIB, and Storyboard
Interface Builder
An overview of the editor
Working with XIB files
Managing user interfaces with Storyboards
Connecting user interfaces with your code
Implementing navigation with Storyboard and segues
The unwind segue
Hands-on code
Summary
4. Auto Layout
How Auto Layout works
Xcode and Auto Layout
Practical introduction to constraints
Xcode helpers
Intrinsic content size
Independence from screen size
Updating constraints programmatically
Working with Auto Layout programmatically
Initializing the views
Adding constraints
Working with multiple views
Relations between views
Summary
5. Adaptive User Interfaces
UI definition with size classes
User interface's traits
Trait collection and trait environment
Working with trait collections
Size classes and Interface Builder
Hands-on code
Image assets and size classes
Working with Dynamic Type
Configurable text size
Exploring text styles
Improving Auto Layout structures with UIStackView
Setting up UIStackView
UIStackView and adaptive layouts
Summary
6. Layers and Core Animation
Exploring layers
Layers and views
The content of a layer
Flat layer
The contents property
The layer delegate
Layer subclassing
Contents properties
The layer geometry
The layers hierarchy
The appearance of layers
Working with core animation
Layers and animations
Implicit animations
Properties animations
Initializing and launching the animation
Keeping the animation result
Handling timing and repetitions
Animations group
Keyframe animations
Removing animations from a layer
View animations
Summary
7. UI Interactions – Touches and Gestures
Events and touches
Touch phases
The UITouch class
Responder chain
Hit-testing
Responding to touch events
Gestures and gesture recognizers
Working with gesture recognizers
Gesture recognizer states
Hands-on code
Summary
8. How to Build Custom Controls
The Thermostat control
Designing a custom control
The UIControl class
Implementing the ThermostatSlider control
Control initialization
Drawing the control
Prototyping using playground
Drawing the borders
Drawing the track
Drawing the handle
Updating the control value
Updating borders
Updating the track
Updating the handle
Touch tracking
Beginning tracking
Continuing tracking
Ending tracking
Sending actions
Customizing the control with UI Appearance
Summary
9. Introduction to Core Graphics
Drawing on the graphic context
How drawing works
Handling the graphic states
The coordinate system
UIKit helpers
Drawing with fill and stroke options
Drawing with blending modes
Drawing with paths
Drawing with paths
Path initialization
Building a path
Drawing the path
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜