Implementing UI Designs in Interface Builder

Similar documents
Mastering UIKit on tvos

New UIKit Support for International User Interfaces

Extending Your Apps with SiriKit

Monetize and Promote Your App with iad

Building the App - Part 5 - Adding a Link

Improving your Existing Apps with Swift

App. Chapter 19 App. App (ViewController) App. Single View Application Single View Application View. (View Controller)

Advanced Debugging and the Address Sanitizer

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

Using and Extending the Xcode Source Editor

Media and Gaming Accessibility

What s New in Xcode App Signing

Enhancing your apps for the next dimension of touch

Leveraging Touch Input on ios

Mysteries of Auto Layout, Part 1

Cocoa Touch Best Practices

WatchKit In-Depth, Part 2

CSC 581: Mobile App Development Spring 2018

Building Faster in Xcode

Optimizing Swift Performance Session 409

Advanced Notifications

INTRODUCTION TO ARCHITECTING YOUR IOS APP

Seamless Linking to Your App

Quick Interaction Techniques for watchos

What s New in watchos

What s New in tvos 12

ios Application Development Lecture 2: Seminar and Unit 1

Social Pinboard: ios(swift) Application

ITP 342 Mobile App Dev. Connections

Document Version Date: 1st March, 2015

What s New in NSCollectionView Session 225

Building Apps with Dynamic Type

} override func didreceivememorywarning() { 26 super.didreceivememorywarning() 27 } 28 } Pause Stop

What s New in Testing

Accessibility on ios. Developing for everyone. Frameworks #WWDC14. Session 210 Clare Kasemset ios Accessibility

Tables. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder

Profiling in Depth. Do you know where your code is? Session 412. Kris Markel Performance Tools Engineer Chad Woolf Performance Tools Engineer

Introducing the Modern WebKit API

imessage Apps and Stickers, Part 2

Building GUIs with UIKit. Kevin Cathey

News- ipad: ios(swift) Application

Advanced Scrollviews and Touch Handling Techniques

Lecture 8 Demo Code: Cassini Multithreading

Introducing On Demand Resources

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney

What's New in UIKit Dynamics and Visual Effects Session 229

CSC 581: Mobile App Development Spring 2019

Modern User Interaction on ios

Accessibility on OS X

Designing for Apple Watch

Building Mapping Apps for ios With Swift

Localizing with Xcode 9

Mastering Drag and Drop

Intro to Development for ios. Dave Koziol Arbormoon Software, Inc.

Mobile Development - Lab 2

Introducing Password AutoFill for Apps

ios Accessibility Developing for everyone Session 201 Ian Fisch ios Accessibility

Adapting to the New UI of OS X Yosemite

Stream iphone Sensor Data to Adafruit IO

Announcements. Today s Topics

User Interfaces. Lecture 15. Application Programming on Mac OS. Hamza Bennani September 4, 2018

iphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5

What s New in MapKit. App Frameworks #WWDC17. Fredrik Olsson

What s New in SpriteKit

What s New in LLDB. Debug your way to fame and glory #WWDC15. Developer Tools. Session 402

Thread Sanitizer and Static Analysis

What s New in imessage Apps

Creating Great App Previews

Getting the Most Out of HealthKit

Mastering Xcode for iphone OS Development Part 2. Marc Verstaen Sr. Manager, iphone Tools

This book contains code samples available under the MIT License, printed below:

ios Development - Xcode IDE

Designing Great Apple Watch Experiences

Mastering Xcode for iphone OS Development Part 1. Todd Fernandez Sr. Manager, IDEs

Intro to Native ios Development. Dave Koziol Arbormoon Software, Inc.

View Concepts. iphone Application Programming Lecture 4: User Interface Design. SDK provide many types of Views to show your content

Chapter 22 TableView TableView. TableView ios. ViewController. Cell TableViewCell TableView

App Extension Best Practices

Creating Complications with ClockKit Session 209

Assignment I: Concentration

ios DeCal : Lecture 2 Structure of ios Applications: MVC and Auto Layout

Collection Views. Dr. Sarah Abraham

COMPLETE TUTORIAL COURSE. Learn to make tvos LE. apps with real-worldam S F

Objectives. Submission. Register for an Apple account. Notes on Saving Projects. Xcode Shortcuts. CprE 388 Lab 1: Introduction to Xcode

Creating Extensions for ios and OS X, Part Two

Navigation and Segues

Core Data Best Practices

What s New in CloudKit

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall

Apple Watch Docs. Release 0.1. Michael Hahn

What s New in Energy Debugging

Data Delivery with Drag and Drop

Enabling Your App for CarPlay

Finding Bugs Using Xcode Runtime Tools

Storyboards and Controllers on OS X

Apple Watch Design Tips and Tricks

Using Grouped Notifications

Rx in the real world. 1 Rob Ciolli

Adopting Advanced Features of the New UI

Transcription:

Developer Tools #WWDC15 Implementing UI Designs in Interface Builder Session 407 Kevin Cathey Interface Builder Engineer Tony Ricciardi Interface Builder Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

Design Time

Design Time Build Time

Design Time Build Time Run Time

Design Time Build Time Run Time

Demo Design Time Best Practices, Tips and Tricks

Takeaways Best practices

Takeaways Best practices Stack Views

Takeaways Best practices Stack Views Dynamic Type

Takeaways Best practices Stack Views Dynamic Type Designables

Takeaways Best practices Stack Views Dynamic Type Designables Inspectables

Takeaways Best practices Stack Views Dynamic Type Designables Inspectables Storyboard References

Takeaways Tips and tricks

Takeaways Tips and tricks Fast Selection

Takeaways Tips and tricks Fast Selection Canvas Customizations

Takeaways Tips and tricks Fast Selection Canvas Customizations Advanced Navigation

Takeaways Tips and tricks Fast Selection Canvas Customizations Advanced Navigation Multiple Bar Items

Takeaways Tips and tricks Fast Selection Canvas Customizations Advanced Navigation Multiple Bar Items Simulated Metrics

Design Time Build Time Run Time

Design Time Build Time Run Time

Design Time Build Time Run Time

Design Time XML Documents Build Time Run Time

Design Time XML Documents Build Time ibtool Run Time

Design Time Build Time Run Time XML Documents ibtool Nib Files

Compiling Storyboards

Compiling Storyboards

Compiling Storyboards

Compiling Storyboards

Compiling Storyboards

Compiling Storyboards

Compiling Storyboards

Compiling Storyboards

Loading Storyboards At Run Time

Loading Storyboards At Run Time UIStoryboard init(name:bundle:)

Loading Storyboards At Run Time UIStoryboard instantiateinitialviewcontroller() UIStoryboard init(name:bundle:)

Loading Storyboards At Run Time UIStoryboard instantiateinitialviewcontroller() UIViewController view UIStoryboard init(name:bundle:)

Loading Storyboards At Run Time UIStoryboard instantiateinitialviewcontroller() UIViewController view UIStoryboard instantiateviewcontrollerwithidentifier(_:) UIStoryboard init(name:bundle:)

Loading Storyboards At Run Time UIStoryboard instantiateinitialviewcontroller() UIViewController view UIStoryboard instantiateviewcontrollerwithidentifier(_:) UIStoryboard init(name:bundle:)

Loading Storyboards At Run Time UIStoryboard instantiateinitialviewcontroller() UIViewController view UIStoryboard instantiateviewcontrollerwithidentifier(_:) UIStoryboard init(name:bundle:) UITableView dequeuereusablecellwithidentifier(_:)

Takeaways

Takeaways Performance. Nib files loaded on demand.

Takeaways Performance. Nib files loaded on demand. Reuse. Nib files enable reuse.

Takeaways Performance. Nib files loaded on demand. Reuse. Nib files enable reuse. Life cycle. Know when objects are created.

Design Time Build Time Run Time

Design Time Build Time Run Time

Design Time Build Time Run Time

Design Time Build Time Run Time

Interface Builder at Run Time Tony Ricciardi

{ } Design Time Build Time Connections Adaptability Run API Time

{ } Design Time Build Time Connections Adaptability Run API Time

{ } Run Time Connections API Adaptability

{ } Run Time Connections API Adaptability

{ } Run Time Connections API Adaptability

{ } Run Time Connections API Adaptability

Connections class AccountViewController : UIViewController { @IBOutlet var usernamelabel: UILabel! override func viewdidload() { } usernamelabel.text = username var username: String? { didset { usernamelabel?.text = username } } } }

Connections class AccountViewController : UIViewController { @IBOutlet var usernamelabel: UILabel! override func viewdidload() { } usernamelabel.text = username var username: String? { didset { usernamelabel?.text = username } } }

Connections class AccountViewController : UIViewController { @IBOutlet var usernamelabel: UILabel! override func viewdidload() { } usernamelabel.text = username var username: String? { didset { usernamelabel?.text = username } } }

Connections class AccountViewController : UIViewController { @IBOutlet var usernamelabel: UILabel! override func viewdidload() { } usernamelabel.text = username var username: String? { didset { usernamelabel?.text = username } } }

Connections class LoginViewController : UIViewController { @IBAction func toggledautologinswitch(sender: UISwitch) { } UserSettings.autoLogin = sender.on @IBAction func tappedloginbutton() { if attemptlogin() { performseguewithidentifier("unwindafterlogin", sender: nil) } else { performseguewithidentifier("presentloginerror", sender: nil) } } }

Connections class LoginViewController : UIViewController { @IBAction func toggledautologinswitch(sender: UISwitch) { } UserSettings.autoLogin = sender.on @IBAction func tappedloginbutton() { if attemptlogin() { performseguewithidentifier("unwindafterlogin", sender: nil) } else { performseguewithidentifier("presentloginerror", sender: nil) } } }

Connections class LoginViewController : UIViewController { @IBAction func toggledautologinswitch(sender: UISwitch) { } UserSettings.autoLogin = sender.on @IBAction func tappedloginbutton() { if attemptlogin() { performseguewithidentifier("unwindafterlogin", sender: nil) } else { performseguewithidentifier("presentloginerror", sender: nil) } } }

API UIStoryboard: init(name:bundle:) func instantiateinitialviewcontroller() func instantiateviewcontrollerwithidentifier(_:) UIViewController: var storyboard: UIStoryboard? { get }

API UIViewController: func prepareforsegue(_:sender:) func performseguewithidentifier(_:sender:) func shouldperformseguewithidentifier(_:sender:) -> Bool func unwindforsegue(_:towardsviewcontroller:) UIStoryboardSegue: func perform() What s New in Storyboards Nob Hill Thursday 9:00AM

Adaptability

Adaptability Button

Adaptability Button

Adaptability Button

Adaptability Button1 Button2 Button3 Button4

Adaptability Button1 Button2 Button3 Button4

Adaptability Button1 Button2 Button3 Button4

Adaptability Button1 Button2 Button3 Button4

{ } Connections API Adaptability

Demo Interface Builder at Run Time

Summary

Summary Design a flexible UI with constraints and stack views

Summary Design a flexible UI with constraints and stack views Rapidly iterate with designable views

Summary Design a flexible UI with constraints and stack views Rapidly iterate with designable views Modularize your UI with Storyboard References

Summary Design a flexible UI with constraints and stack views Rapidly iterate with designable views Modularize your UI with Storyboard References Reuse content with the storyboard API instantiateviewcontrollerwithidentifier(_:)

Summary Design a flexible UI with constraints and stack views Rapidly iterate with designable views Modularize your UI with Storyboard References Reuse content with the storyboard API Make your UI adaptive with Size Classes

More Information Apple Developer Forums http://developer.apple.com/forums Stefan Lesser Developer Tools Evangelist slesser@apple.com

Related Sessions What s New in Storyboards Mission Thursday 9:00AM Mysteries of Auto Layout, Part 1 Presidio Thursday 11:00AM Mysteries of Auto Layout, Part 2 Presidio Thursday 1:30PM Building Adaptive Apps with UIKit Taking Control of Auto Layout in Xcode WWDC14 WWDC13

Related Labs Interface Builder and Auto Layout Developer Tools Lab C Thursday 2:30PM