Programming iOS 12. Dive Deep into Views, View Controllers, and Frameworks - Helion
ISBN: 978-14-920-4458-1
stron: 1176, Format: ebook
Data wydania: 2018-10-04
Księgarnia: Helion
Cena książki: 220,15 zł (poprzednio: 255,99 zł)
Oszczędzasz: 14% (-35,84 zł)
If you’re grounded in the basics of Swift, Xcode, and the Cocoa framework, this book provides a structured explanation of all essential real-world iOS app components. Through deep exploration and copious code examples, you’ll learn how to create views, manipulate view controllers, and add features from iOS frameworks.
- Create, arrange, draw, layer, and animate views that respond to touch
- Use view controllers to manage multiple screens of interface
- Master interface classes for scroll views, table views, text, popovers, split views, web views, and controls
- Dive into frameworks for sound, video, maps, and sensors
- Access user libraries: music, photos, contacts, and calendar
- Explore additional topics, including files, networking, and threads
Stay up-to-date on iOS 12 innovations, such as User Notification framework improvements, as well as changes in Xcode 10 and Swift 4.2. All example code is available on GitHub for you to download, study, and run.
Want to brush up on the basics? Pick up iOS 12 Programming Fundamentals with Swift to learn about Swift, Xcode, and Cocoa. Together with Programming iOS 12, you’ll gain a solid, rigorous, and practical understanding of iOS 12 development.
Osoby które kupowały "Programming iOS 12. Dive Deep into Views, View Controllers, and Frameworks", wybierały także:
- Zen Steve'a Jobsa 29,67 zł, (8,90 zł -70%)
- Programowanie aplikacji mobilnych dla iOS z wykorzystaniem Xcode, Swift 3.0 i iOS 10 SDK. Kurs video. Poziom pierwszy 99,00 zł, (44,55 zł -55%)
- Flutter i Dart 2 dla początkujących. Przewodnik dla twórców aplikacji mobilnych 89,00 zł, (44,50 zł -50%)
- Dostosuj się lub giń. Jak odnieść sukces w branży aplikacji mobilnych 44,90 zł, (22,45 zł -50%)
- Podstawy języka Swift. Programowanie aplikacji dla platformy iOS 49,00 zł, (24,50 zł -50%)
Spis treści
Programming iOS 12. Dive Deep into Views, View Controllers, and Frameworks eBook -- spis treści
- Preface
- The Scope of This Book
- Versions
- Acknowledgments
- From the Programming iOS 4 Preface
- Conventions Used in This Book
- Using Code Examples
- OReilly Safari
- How to Contact Us
- I. Views
- 1. Views
- The Window and Root View
- How an App Launches
- Subclassing UIWindow
- Referring to the Window
- Experimenting with Views
- Subview and Superview
- Visibility and Opacity
- Frame
- Bounds and Center
- Transform
- The View Environment
- Window Coordinates and Screen Coordinates
- Trait Collections and Size Classes
- Layout
- Autoresizing
- Autolayout and Constraints
- Implicit Autoresizing Constraints
- Creating Constraints in Code
- Anchor notation
- Visual format notation
- Constraints as Objects
- Margins and Guides
- Safe area
- Margins
- Custom layout guides
- Intrinsic Content Size and Alignment Rects
- Stack Views
- Internationalization
- Mistakes with Constraints
- Configuring Layout in the Nib
- Autoresizing in the Nib
- Creating a Constraint
- Viewing and Editing Constraints
- Problems with Nib Constraints
- Varying the Screen Size
- Conditional Interface Design
- Size classes in the inspectors
- Size classes in the canvas
- Xcode View Features
- View Debugger
- Previewing Your Interface
- Designable Views and Inspectable Properties
- Layout Events
- Layout-Driven UI
- Tweaking Autolayout
- Simulating Autolayout
- The Window and Root View
- 2. Drawing
- Images and Image Views
- Image Files
- Image files and size classes
- Namespacing image files
- Image Views
- Resizable Images
- Transparency Masks
- Reversible Images
- Image Files
- Graphics Contexts
- Drawing On Demand
- Drawing a UIImage
- UIImage Drawing
- CGImage Drawing
- Snapshots
- CIFilter and CIImage
- Blur and Vibrancy Views
- Drawing a UIView
- Graphics Context Commands
- Graphics Context Settings
- Paths and Shapes
- Clipping
- Gradients
- Colors and Patterns
- Graphics Context Transforms
- Shadows
- Erasing
- Points and Pixels
- Content Mode
- Images and Image Views
- 3. Layers
- View and Layer
- Layers and Sublayers
- Manipulating the Layer Hierarchy
- Positioning a Sublayer
- CAScrollLayer
- Layer and Delegate
- Layout of Layers
- Drawing in a Layer
- Drawing-Related Layer Properties
- Content Resizing and Positioning
- Layers that Draw Themselves
- Transforms
- Affine Transforms
- 3D Transforms
- Depth
- Sublayer transform
- Transform layers
- Further Layer Features
- Shadows
- Borders and Rounded Corners
- Masks
- Layer Efficiency
- Layers and KeyValue Coding
- 4. Animation
- Drawing, Animation, and Threading
- Image View and Image Animation
- View Animation
- A Brief History of View Animation
- Property Animator Basics
- View Animation Basics
- View Animation Configuration
- Animations function
- Completion function
- Animation duration
- Animation delay
- Animation timing
- Animation options
- Timing Curves
- Cubic timing curves
- Springing timing curves
- Canceling a View Animation
- Canceling a block-based animation
- Canceling a property animators animation
- Canceling a repeating animation
- Frozen View Animation
- Custom Animatable View Properties
- Keyframe View Animation
- Transitions
- Transitioning one view
- Transitioning two views and their superview
- Implicit Layer Animation
- Animation Transactions
- Media Timing Functions
- Core Animation
- CABasicAnimation and Its Inheritance
- Using a CABasicAnimation
- Springing Animation
- Keyframe Animation
- Making a Property Animatable
- Grouped Animations
- Freezing an Animation
- Transitions
- Animations List
- Actions
- What an Action Is
- Action Search
- Hooking Into the Action Search
- Making a Custom Property Implicitly Animatable
- Nonproperty Actions
- Emitter Layers
- CIFilter Transitions
- UIKit Dynamics
- The Dynamics Stack
- Custom Behaviors
- Animator and Behaviors
- UIDynamicItemBehavior
- UIGravityBehavior
- UIFieldBehavior
- UIPushBehavior
- UICollisionBehavior
- UISnapBehavior
- UIAttachmentBehavior
- Motion Effects
- Animation and Layout
- 5. Touches
- Touch Events and Views
- Receiving Touches
- Restricting Touches
- Interpreting Touches
- Gesture Recognizers
- Gesture Recognizer Classes
- Gesture Recognizer Conflicts
- Subclassing Gesture Recognizers
- Gesture Recognizer Delegate
- Gesture Recognizers in the Nib
- 3D Touch Press Gesture
- Touch Delivery
- Hit-Testing
- Performing Hit-Testing
- Hit-Test Munging
- Hit-Testing For Layers
- Hit-Testing For Drawings
- Hit-Testing During Animation
- Initial Touch Event Delivery
- Gesture Recognizer and View
- Touch Exclusion Logic
- Gesture Recognition Logic
- 1. Views
- II. Interface
- 6. View Controllers
- View Controller Responsibilities
- View Controller Hierarchy
- Automatic Child View Placement
- Manual Child View Placement
- Presentation View Placement
- Ensuring a Coherent Hierarchy
- View Controller Creation
- How a View Controller Obtains Its View
- Manual View
- Generic Automatic View
- View in a Separate Nib
- The eponymous nib
- Different nibs for different device types
- Summary
- How Storyboards Work
- How a View Controller Nib is Loaded
- How a View Nib is Loaded
- View Resizing
- View Size in the Nib Editor
- Bars and Underlapping
- Status bar
- Extended layout
- Resizing and Layout Events
- Rotation
- Detecting Rotation
- Uses of Rotation
- Permitting Compensatory Rotation
- Initial Orientation
- View Controller Manual Layout
- Initial Manual Layout
- Manual Layout During Rotation
- Presented View Controller
- Presentation and Dismissal
- View controller relationships during presentation
- Manual view controller presentation
- Configuring a Presentation
- Transition style
- Presentation style
- Current context presentation
- Configuration in the nib editor
- Communication with a Presented View Controller
- Adaptive Presentation
- Presentation, Rotation, and the Status Bar
- Presentation and Dismissal
- Tab Bar Controller
- Tab Bar Items
- Configuring a Tab Bar Controller
- Navigation Controller
- Bar Button Items
- Navigation Items and Toolbar Items
- Configuring a Navigation Controller
- Custom Transition
- Noninteractive Custom Transition Animation
- Interactive Custom Transition Animation
- Custom Presented View Controller Transition
- Customizing the animation
- Customizing the presentation
- Transition Coordinator
- Page View Controller
- Preparing a Page View Controller
- Page View Controller Navigation
- Page indicator
- Navigation gestures
- Other Page View Controller Configurations
- Container View Controllers
- Adding and Removing Children
- The initial child view controller
- Replacing a child view controller
- Status Bar, Traits, and Resizing
- Adding and Removing Children
- Peek and Pop
- Storyboards
- Triggered Segues
- Triggered segue behavior
- How a segue is triggered
- View controller communication
- Container Views and Embed Segues
- Storyboard References
- Unwind Segues
- Creating an unwind segue
- How an unwind segue works
- How the destination view controller is found
- How an unwind segue is performed
- Unwind segue customization
- Triggered Segues
- View Controller Lifetime Events
- Order of Events
- Appear and Disappear Events
- Event Forwarding to a Child View Controller
- View Controller Memory Management
- Lazy Loading
- NSCache, NSPurgeableData, and Memory-Mapping
- Background Memory Usage
- State Restoration
- How to Test State Restoration
- Participating in State Restoration
- Restoration ID, Identifier Path, and Restoration Class
- Identifier path
- Restoration class
- App delegate instead of restoration class
- Restoring View Controller State
- Restoration Order of Operations
- Restoration of Other Objects
- 7. Scroll Views
- Content Size
- Creating a Scroll View in Code
- Manual Content Size
- Automatic Content Size with Autolayout
- Scroll View Layout Guides
- Using a Content View
- Scroll View in a Nib
- No Internal Autolayout
- Internal Autolayout
- Content Inset
- Scrolling
- Scrolling in Code
- Paging
- Tiling
- Zooming
- Zooming Programmatically
- Zooming with Detail
- Scroll View Delegate
- Scroll View Touches
- Floating Scroll View Subviews
- Scroll View Performance
- 8. Table Views and Collection Views
- Table View Controller
- Table View Cells
- Built-In Cell Styles
- Registering a Cell Class
- Custom Cells
- Overriding a cells subview layout
- Adding subviews in code
- Designing a cell in a nib
- Designing a cell in a storyboard
- Table View Data
- The Three Big Questions
- Reusing Cells
- Table View Sections
- Section Headers and Footers
- Header and footer views
- Example of a table view with sections
- Section Index
- Section Headers and Footers
- Refreshing a Table View
- Direct Access to Cells
- Refresh Control
- Variable Row Heights
- Manual Row Height Measurement
- Measurement and Layout with Constraints
- Estimated Height
- Automatic Row Height
- Table View Selection
- Managing Cell Selection
- Responding to Cell Selection
- Navigation from a Table View
- Cell Choice and Static Tables
- Table View Scrolling and Layout
- Table View State Restoration
- Table View Searching
- Configuring a Search Controller
- Using a Search Controller
- Minimal search results table
- Scope buttons
- Search bar in navigation bar
- No search results controller
- Table View Editing
- Toggling a Table Views Edit Mode
- Changing a Table Views Structure
- Deleting Cells
- Custom Action Buttons
- Editable Content in Cells
- Inserting Cells
- Rearranging Cells
- Collapsing and Expanding Cells
- Collapsible section
- Expandable cell
- Table View Menus
- Collection Views
- Collection View Classes
- Using a Collection View
- Deleting Cells
- Rearranging Cells
- Custom Collection View Layouts
- Flow Layout Subclass
- Collection View Layout Subclass
- Decoration Views
- Switching Layouts
- Collection Views and UIKit Dynamics
- 9. iPad Interface
- Popovers
- Arrow Source and Direction
- Popover Size
- Popover Appearance
- Passthrough Views
- Popover Presentation, Dismissal, and Delegate
- Adaptive Popovers
- Popover Segues
- Popover Presenting a View Controller
- Split Views
- Expanded Split View Controller (iPad)
- Collapsed Split View Controller (iPhone)
- Expanding Split View Controller (Big iPhone)
- Customizing a Split View Controller
- Split View Controller in a Storyboard
- Setting the Collapsed State
- View Controller Message Percolation
- iPad Multitasking
- Drag and Drop
- Drag and Drop Architecture
- Basic Drag and Drop
- The drag source view
- The drop destination view
- Item Providers
- NSItemProviderWriting
- NSItemProviderReading
- Vending additional representations
- Receiving additional representations
- Slow Data Delivery
- Additional Delegate Methods
- Custom drag preview
- Additional animation
- Flocking
- Table Views and Collection Views
- Table view dragging
- Table view dropping
- Time-consuming table view drop data delivery
- Table view drop animations
- Spring Loading
- iPhone and Local Drag and Drop
- Popovers
- 10. Text
- Fonts and Font Descriptors
- Fonts
- System font
- Dynamic type
- Adding fonts
- Font Descriptors
- Fonts
- Attributed Strings
- Attributed String Attributes
- Making an Attributed String
- Tab stops
- Text attachments
- Other ways to create an attributed string
- Modifying and Querying an Attributed String
- Custom Attributes
- Drawing and Measuring an Attributed String
- Labels
- Number of Lines
- Wrapping and Truncation
- Resizing a Label to Fit Its Text
- Customized Label Drawing
- Text Fields
- Summoning and Dismissing the Keyboard
- Keyboard Covers Text Field
- Text Field Delegate and Control Event Messages
- Text Field Menu
- Drag and Drop
- Keyboard and Input Configuration
- Text input traits
- Accessory view
- Input view
- Input view without a text field
- Shortcuts bar
- Keyboard language
- Text Views
- Links, Text Attachments, and Data
- Self-Sizing Text View
- Text View and Keyboard
- Text Kit
- Text View and Text Kit
- Text Container
- Alternative Text Kit Stack Architectures
- Multiple text containers
- Multiple layout managers
- Layout Manager
- Text Kit Without a Text View
- Fonts and Font Descriptors
- 11. Web Views
- WKWebView
- Web View Content
- Tracking Changes in a Web View
- Web View Navigation
- Communicating with a Web Page
- Communicating into a web page
- Communicating out of a web page
- JavaScript alerts
- Custom Schemes
- Web View Peek and Pop
- Safari View Controller
- Developing Web View Content
- WKWebView
- 12. Controls and Other Views
- UIActivityIndicatorView
- UIProgressView
- Progress View Alternatives
- The Progress Class
- UIPickerView
- UISearchBar
- UIControl
- UISwitch
- UIStepper
- UIPageControl
- UIDatePicker
- UISlider
- UISegmentedControl
- UIButton
- Custom Controls
- Bars
- Bar Position and Bar Metrics
- Bar Appearance
- UIBarButtonItem
- UINavigationBar
- UIToolbar
- UITabBar
- Tint Color
- Appearance Proxy
- 13. Modal Dialogs
- Alerts and Action Sheets
- Alerts
- Action Sheets
- Dialog Alternatives
- Quick Actions
- Local Notifications
- Authorization for Local Notifications
- Notification Categories
- Custom actions
- Dismiss action
- Previews
- Scheduling a Local Notification
- Hearing About a Local Notification
- Grouped Notifications
- Managing Notifications
- Notification Content Extensions
- Action button management
- Interface interaction
- Today Extensions
- Activity Views
- Presenting an Activity View
- Custom Activities
- Action Extensions
- Share Extensions
- Alerts and Action Sheets
- 6. View Controllers
- III. Some Frameworks
- 14. Audio
- System Sounds
- Audio Session
- Category
- Activation and Deactivation
- Ducking
- Interruptions
- Secondary Audio
- Routing Changes
- Audio Player
- Remote Control of Your Sound
- Playing Sound in the Background
- AVAudioEngine
- MIDI Playback
- Text to Speech
- Speech to Text
- Further Topics in Sound
- 15. Video
- AVPlayerViewController
- Other AVPlayerViewController Properties
- Picture-in-Picture
- Introducing AV Foundation
- Some AV Foundation Classes
- Things Take Time
- Keyvalue observing a property
- Asynchronous property loading
- Remote assets
- Time is Measured Oddly
- Constructing Media
- Cutting and pasting
- Adding tracks
- Transitions
- Filters
- Synchronizing animation with video
- Adding layers to video
- AVPlayerLayer
- Further Exploration of AV Foundation
- UIVideoEditorController
- AVPlayerViewController
- 16. Music Library
- Music Library Authorization
- Exploring the Music Library
- Querying the Music Library
- Forming a query
- Performing a query
- Persistence and Change in the Music Library
- Querying the Music Library
- Music Player
- MPVolumeView
- Playing Songs with AV Foundation
- Media Picker
- 17. Photo Library and Camera
- Browsing with UIImagePickerController
- Image Picker Controller Presentation
- Image Picker Controller Delegate
- Dealing with Image Picker Controller Results
- Photos Framework
- Querying the Photo Library
- Modifying the Library
- Being Notified of Changes
- Fetching Images
- Editing Images
- How to change a photo image
- Handling the adjustment data
- Example: Before editing
- Example: After editing
- Photo Editing Extension
- Using the Camera
- Capture with UIImagePickerController
- Capture with AV Foundation
- Browsing with UIImagePickerController
- 18. Contacts
- Contact Classes
- Fetching Contact Information
- Fetching a Contact
- Repopulating a Contact
- Labeled Values
- Contact Formatters
- Saving Contact Information
- Contact Sorting, Groups, and Containers
- Contacts Interface
- CNContactPickerViewController
- CNContactViewController
- Existing contact
- New contact
- Unknown contact
- 19. Calendar
- Calendar Database Contents
- Calendars
- Calendar Items
- Calendar Database Changes
- Creating Calendars, Events, and Reminders
- Events
- Alarms
- Recurrence
- Reminders
- Proximity Alarms
- Fetching Events and Reminders
- Calendar Interface
- EKEventViewController
- EKEventEditViewController
- EKCalendarChooser
- Calendar Database Contents
- 20. Maps
- Displaying a Map
- Annotations
- Customizing an MKMarkerAnnotationView
- Changing the Annotation View Class
- Custom Annotation View Class
- Custom Annotation Class
- Annotation View Hiding and Clustering
- Other Annotation Features
- Overlays
- Custom Overlay Class
- Custom Overlay Renderer
- Other Overlay Features
- Map Kit and Current Location
- Communicating with the Maps App
- Geocoding, Searching, and Directions
- Geocoding
- Searching
- Directions
- 21. Sensors
- Core Location
- Location Manager, Delegate, and Authorization
- Location Tracking
- Where Am I?
- Background Location
- Continuous background location
- Location monitoring
- Heading
- Acceleration, Attitude, and Activity
- Shake Events
- Using Core Motion
- Raw Acceleration
- Gyroscope
- Other Core Motion Data
- Core Location
- 14. Audio
- IV. Final Topics
- 22. Persistent Storage
- The Sandbox
- Standard Directories
- Inspecting the Sandbox
- Basic File Operations
- Saving and Reading Files
- NSCoding
- Codable
- User Defaults
- Simple Sharing and Previewing of Files
- File Sharing
- Document Types and Receiving a Document
- Handing Over a Document
- Previewing a Document
- Quick Look Previews
- Document Architecture
- A Basic Document Example
- iCloud
- Document Browser
- Custom Thumbnails
- Custom Previews
- Document Picker
- XML
- JSON
- SQLite
- Core Data
- PDFs
- Image Files
- The Sandbox
- 23. Basic Networking
- HTTP Requests
- Obtaining a Session
- Session Configuration
- Session Tasks
- Session Delegate
- HTTP Request with Task Completion Function
- HTTP Request with Session Delegate
- Download task
- Data task
- One Session, One Delegate
- Delegate Memory Management
- Session and Delegate Encapsulation
- Downloading Table View Data
- Background Session
- On-Demand Resources
- In-App Purchases
- HTTP Requests
- 24. Threads
- Main Thread
- Background Threads
- Why Threading Is Hard
- Blocking the Main Thread
- Manual Threading
- Operation
- Grand Central Dispatch
- Commonly Used GCD Methods
- Synchronous Execution
- Dispatch Groups
- One-time Execution
- Concurrent Queues
- Checking the Queue
- Threads and App Backgrounding
- 25. Undo
- TargetAction Undo
- Undo Grouping
- Functional Undo
- Undo Interface
- Shake-To-Edit
- Undo Menu
- A. Application Lifetime Events
- Application States
- App Delegate Events
- App Lifetime Scenarios
- Major State Changes
- Paused Inactivity
- Transient Inactivity on the iPad
- Lifetime Event Timing
- B. Some Useful Utility Functions
- Launch Without Main Storyboard
- Core Graphics Initializers
- Center of a CGRect
- Adjust a CGSize
- Delayed Performance
- Dictionary of Views
- Constraint Priority Arithmetic
- Constraint Issues
- Configure a Value Class at Point of Use
- Finite Repetition of an Animation
- Remove Multiple Indexes from an Array
- C. How Asynchronous Works
- 22. Persistent Storage
- Index