SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
This presentation is provided on a strictly private and confidential basis for information purposes only.
Notification, Auto Layout
presented by
Jeffery Kao
2017/07/07
Rich Notifications
Notification
Short Look What is this notification about?
Long Look What extra information is helpful?
Quick Actions What actions are appropriate?
Rich Notification
Short Look
Long Look
Rich Notification - Mail
Rich Notification - Photos
Rich Notification - Tips
Rich Notification - Phone
Rich Notification - Find Friends
Rich Notification - Messages
Rich Notification - KUNA APP
In our new iOS app you now have
the ability to 3D touch (Force touch)
notifications that arrive from Kuna –
this will immediately display an
animated image of what caused that
notification.
You can then snooze alerts for two
hours, or play a pre-recorded
message. If you do not have 3D
touch on your phone – you can still
swipe left on the notification to view
this new feature (iOS 10 only!)
Rich Notification - KUNA APP
Design - Recap
Clear description in the short looks
Provide extra context in beautifully designed long looks
Relevant quick actions
Best Practices and What’s
New in User Notifications
API - Notification
Notification Type:
- Local Notification
- Remote Notification
Notification Extension:
- Notification Service Extension
- Notification Content Extension
Purpose:
- Location-based, time-based or reminder
- Silence Notification
Hidden Notification Content
Hidden Notification Content:
- Extended support all apps
- Global setting
- Settings per app
- API to customize notification content
init(identifier: String, actions: [UNNotificationAction],
intentIdentifiers: [String], hiddenPreviewsBodyPlaceholder:
String, options: UNNotificationCategoryOptions = [])
NEW
Hidden Notification Content
// hiddent notification content
let commentCategory = UNNotificationCategory(identifier: "comment-category",
actions: [],
intentIdentifiers: [],
hiddenPreviewsBodyPlaceholder: "Comment" // 隱藏後仍然可以看到的body
)
NEW
Hidden Notification Content
// hiddent notification content
let commentCategory = UNNotificationCategory(identifier: "comment-category",
actions: [],
intentIdentifiers: [],
hiddenPreviewsBodyPlaceholder: "%u Comments" // 隱藏後仍然可以看到的body
)
NEW
Hidden Notification Content
// how about using localization for plural noun?
let commentCategory = UNNotificationCategory(identifier: "comment-category",
actions: [],
intentIdentifiers: [],
hiddenPreviewsBodyPlaceholder: NSLocalizedString("COMMENT_KEY", comment: ""),
options:[.hiddenPreviewsShowTitle])
NEW
Hidden Notification Content
- Set “Show Preview” to “Never” or “Authenticated”
- Only show “Body placeholder”
NEW
Customizing Rich Notification
Customizing Rich Notification
- Content extension: init content size ratio
- Customized input view
- Media button in UNNotificationContentExtension
Size Classes and Core
Components
Table
● Size Classes
● Dynamic Type
● UIKit Components
Multiple Screen Sizes
Multiple Screen Sizes
Multiple Screen Sizes
Compact Width
Compact Height
Layout with Different Screen and Font Size
Different Screen Size
Dynamic Type
Dynamic Type
● Making custom fonts dynamic
● Example: Etsy
UIKit Components
UIKit Components
Auto Layout Techniques
in Interface Builder
Table
● Changing Layout At Runtime
● Tracking Touch
● Dynamic Type
● Safe Areas
● Rest of Topics
Changing Layout at Runtime
BOOL shouldShow = !self.edgeConstraint.active;
// Deactivate constraint first to avoid constraint conflict message
if (shouldShow) {
self.zeroHeightConstraint.active = NO;
self.edgeConstraint.active = YES;
}
else {
self.edgeConstraint.active = NO;
self.zeroHeightConstraint.active = YES;
}
Tracking Touch
Familiar with CGTransform to track touch event
CGAffineTransform = translation + rotation + scale
Dynamic Type
- Interface Builder -> dynamic Type
- set Font size as UIFontTextStyleHeadline |
UIFontTextStyleBody …
- Dynamically change font size with a proper way:
- Xcode -> Open Developer Tool -> Accessibility Inspector
-> Font size
NEW
Safe Areas
Safe Areas (iOS11)
- Property in UIView
- TopLayout, BottomLayout is deprecated
- Upgrade automatically with storyboards
NEW
Safe Areas
NEW
Safe Areas
NEW
Safe Areas
if #available(iOS 11, *) {
let guide = view.safeAreaLayoutGuide
NSLayoutConstraint.activate([
view.topAnchor.constraintEqualToSystemSpacingBelow(guide.topAnchor, multiplier: 1.0),
guide.bottomAnchor.constraintEqualToSystemSpacingBelow(view.bottomAnchor, multiplier: 1.0)])
} else {
// older version
let standardSpacing: CGFloat = 8.0
NSLayoutConstraint.activate([
view.topAnchor.constraint(equalTo: topLayoutGuide.bottomAnchor, constant: standardSpacing),
bottomLayoutGuide.topAnchor.constraint(equalTo: view.bottomAnchor,constant: standardSpacing)])
}
NEW
Rest of Topics
Proportional Positioning
- use spacer view to help you locate your view
Stack View Adaptive Layout
- hidden property by size class (XCode 9 support)
- Use distribution, alignment, and spacing
proportional positioning example
p.s. standard spacing = 8 which can be used in interface
builder
Recap
Notification:
- Some examples for building rich notification
- New API about hidden notification content
Sizing Class:
- Make use of `Dynamic Type` and be aware of device size
AutoLayout:
- Existing techniques (layout changing in runtime or track touch)
- Adapt with new APIs (Safe areas and propotional positioning)
- Stack view example
References
● Rich Notifications
○ https://developer.apple.com/videos/play/wwdc2017/817
● Best Practices and What’s New in User Notifications
○ https://developer.apple.com/videos/play/wwdc2017/708
● Size Classes and Core Components
○ https://developer.apple.com/videos/play/wwdc2017/812
● Auto Layout Techniques in Interface Builder
○ https://developer.apple.com/videos/play/wwdc2017/412
● Useful repo:
○ https://github.com/Sweefties/iOS10-NewAPI-UserNotifications-Example
○ https://useyourloaf.com/blog/safe-area-layout-guide/
This presentation is provided on a strictly private and confidential basis for information purposes only.
THANK YOU

Contenu connexe

Tendances

Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Matheus Cardoso
 
iOS Swift application architecture
iOS Swift application architectureiOS Swift application architecture
iOS Swift application architectureRomain Rochegude
 
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...Sencha
 
The voicesignin.com authentication and identity platform
The voicesignin.com authentication and identity platform The voicesignin.com authentication and identity platform
The voicesignin.com authentication and identity platform Steven Bowden
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoDEVCON
 
The A1 by Christian John Felix
The A1 by Christian John FelixThe A1 by Christian John Felix
The A1 by Christian John FelixDEVCON
 

Tendances (6)

Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!
 
iOS Swift application architecture
iOS Swift application architectureiOS Swift application architecture
iOS Swift application architecture
 
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...
 
The voicesignin.com authentication and identity platform
The voicesignin.com authentication and identity platform The voicesignin.com authentication and identity platform
The voicesignin.com authentication and identity platform
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent Convento
 
The A1 by Christian John Felix
The A1 by Christian John FelixThe A1 by Christian John Felix
The A1 by Christian John Felix
 

En vedette

KKBOX WWDC17 WatchOS - Dada
KKBOX WWDC17  WatchOS  - DadaKKBOX WWDC17  WatchOS  - Dada
KKBOX WWDC17 WatchOS - DadaLiyao Chen
 
KKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - DolphinKKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - DolphinLiyao Chen
 
KKBOX WWDC17 Xcode debug - Oliver
KKBOX WWDC17  Xcode debug - OliverKKBOX WWDC17  Xcode debug - Oliver
KKBOX WWDC17 Xcode debug - OliverLiyao Chen
 
KKBOX WWDC17 Xcode IDE - Hardy
KKBOX WWDC17  Xcode IDE - HardyKKBOX WWDC17  Xcode IDE - Hardy
KKBOX WWDC17 Xcode IDE - HardyLiyao Chen
 
KKBOX WWDC17 Security - Antony
KKBOX WWDC17 Security - AntonyKKBOX WWDC17 Security - Antony
KKBOX WWDC17 Security - AntonyLiyao Chen
 
KKBOX WWDC17 Swift and Foundation - Liyao
KKBOX WWDC17 Swift and Foundation - LiyaoKKBOX WWDC17 Swift and Foundation - Liyao
KKBOX WWDC17 Swift and Foundation - LiyaoLiyao Chen
 
KKBOX WWDC17 Core Image - Daniel Tien
KKBOX WWDC17 Core Image - Daniel TienKKBOX WWDC17 Core Image - Daniel Tien
KKBOX WWDC17 Core Image - Daniel TienLiyao Chen
 
KKBOX WWDC17 SiriKit and CoreSpotlight - Seraph
KKBOX WWDC17  SiriKit and CoreSpotlight - SeraphKKBOX WWDC17  SiriKit and CoreSpotlight - Seraph
KKBOX WWDC17 SiriKit and CoreSpotlight - SeraphLiyao Chen
 
KKBOX WWDC17 Performance and Testing - Hokila
KKBOX WWDC17 Performance and Testing - HokilaKKBOX WWDC17 Performance and Testing - Hokila
KKBOX WWDC17 Performance and Testing - HokilaLiyao Chen
 
專利入門
專利入門專利入門
專利入門Keico Tu
 

En vedette (10)

KKBOX WWDC17 WatchOS - Dada
KKBOX WWDC17  WatchOS  - DadaKKBOX WWDC17  WatchOS  - Dada
KKBOX WWDC17 WatchOS - Dada
 
KKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - DolphinKKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - Dolphin
 
KKBOX WWDC17 Xcode debug - Oliver
KKBOX WWDC17  Xcode debug - OliverKKBOX WWDC17  Xcode debug - Oliver
KKBOX WWDC17 Xcode debug - Oliver
 
KKBOX WWDC17 Xcode IDE - Hardy
KKBOX WWDC17  Xcode IDE - HardyKKBOX WWDC17  Xcode IDE - Hardy
KKBOX WWDC17 Xcode IDE - Hardy
 
KKBOX WWDC17 Security - Antony
KKBOX WWDC17 Security - AntonyKKBOX WWDC17 Security - Antony
KKBOX WWDC17 Security - Antony
 
KKBOX WWDC17 Swift and Foundation - Liyao
KKBOX WWDC17 Swift and Foundation - LiyaoKKBOX WWDC17 Swift and Foundation - Liyao
KKBOX WWDC17 Swift and Foundation - Liyao
 
KKBOX WWDC17 Core Image - Daniel Tien
KKBOX WWDC17 Core Image - Daniel TienKKBOX WWDC17 Core Image - Daniel Tien
KKBOX WWDC17 Core Image - Daniel Tien
 
KKBOX WWDC17 SiriKit and CoreSpotlight - Seraph
KKBOX WWDC17  SiriKit and CoreSpotlight - SeraphKKBOX WWDC17  SiriKit and CoreSpotlight - Seraph
KKBOX WWDC17 SiriKit and CoreSpotlight - Seraph
 
KKBOX WWDC17 Performance and Testing - Hokila
KKBOX WWDC17 Performance and Testing - HokilaKKBOX WWDC17 Performance and Testing - Hokila
KKBOX WWDC17 Performance and Testing - Hokila
 
專利入門
專利入門專利入門
專利入門
 

Similaire à KKBOX WWDC17 Notification and Autolayout - Jefferey

Adopting 3D Touch in your apps
Adopting 3D Touch in your appsAdopting 3D Touch in your apps
Adopting 3D Touch in your appsJuan C Catalan
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1Hussain Behestee
 
Hieu Xamarin iOS9, Android M 3-11-2015
Hieu Xamarin iOS9, Android M  3-11-2015Hieu Xamarin iOS9, Android M  3-11-2015
Hieu Xamarin iOS9, Android M 3-11-2015Nguyen Hieu
 
Cross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha TouchCross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha TouchFolio3 Software
 
Cocoa coders 141113-watch
Cocoa coders 141113-watchCocoa coders 141113-watch
Cocoa coders 141113-watchCarl Brown
 
Notification Framework
Notification FrameworkNotification Framework
Notification FrameworkSokna Ly
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - MozillaRobert Nyman
 
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...将之 小野
 
Introduction to Handoff
Introduction to HandoffIntroduction to Handoff
Introduction to HandoffHarit Kothari
 
Mobile Augmented Reality Using junaio
Mobile Augmented Reality Using junaioMobile Augmented Reality Using junaio
Mobile Augmented Reality Using junaioMark Billinghurst
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonRobert Nyman
 
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Patrick Lauke
 
Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Gabor Varadi
 

Similaire à KKBOX WWDC17 Notification and Autolayout - Jefferey (20)

How to create android push notifications with custom view
How to create android push notifications with custom viewHow to create android push notifications with custom view
How to create android push notifications with custom view
 
Adopting 3D Touch in your apps
Adopting 3D Touch in your appsAdopting 3D Touch in your apps
Adopting 3D Touch in your apps
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
 
Hieu Xamarin iOS9, Android M 3-11-2015
Hieu Xamarin iOS9, Android M  3-11-2015Hieu Xamarin iOS9, Android M  3-11-2015
Hieu Xamarin iOS9, Android M 3-11-2015
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
 
Cross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha TouchCross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha Touch
 
Cocoa coders 141113-watch
Cocoa coders 141113-watchCocoa coders 141113-watch
Cocoa coders 141113-watch
 
Notification Framework
Notification FrameworkNotification Framework
Notification Framework
 
Student Developer Challenge
Student Developer ChallengeStudent Developer Challenge
Student Developer Challenge
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
 
Android Wearable App
Android Wearable AppAndroid Wearable App
Android Wearable App
 
Introduction to Handoff
Introduction to HandoffIntroduction to Handoff
Introduction to Handoff
 
Mobile Augmented Reality Using junaio
Mobile Augmented Reality Using junaioMobile Augmented Reality Using junaio
Mobile Augmented Reality Using junaio
 
Compose Camp by GDSC NSUT
Compose Camp by GDSC NSUTCompose Camp by GDSC NSUT
Compose Camp by GDSC NSUT
 
Oopp Lab Work
Oopp Lab WorkOopp Lab Work
Oopp Lab Work
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Lightning Talk - Xamarin
Lightning Talk - Xamarin Lightning Talk - Xamarin
Lightning Talk - Xamarin
 
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010
 
Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)
 

Plus de Liyao Chen

Auto Layout part 1
Auto Layout part 1Auto Layout part 1
Auto Layout part 1Liyao Chen
 
iOS Unit testing II
iOS Unit testing IIiOS Unit testing II
iOS Unit testing IILiyao Chen
 
iOS Unit test getting stared
iOS Unit test getting starediOS Unit test getting stared
iOS Unit test getting staredLiyao Chen
 
Continuous Integration
Continuous  IntegrationContinuous  Integration
Continuous IntegrationLiyao Chen
 
iOS Design to Code - Code
iOS Design to Code - CodeiOS Design to Code - Code
iOS Design to Code - CodeLiyao Chen
 
iOS Design to Code - Design
iOS Design to Code - DesigniOS Design to Code - Design
iOS Design to Code - DesignLiyao Chen
 
Beta testing with CI
Beta testing with CIBeta testing with CI
Beta testing with CILiyao Chen
 
PTTHOT x IDEAS_HACKATHON 2014
PTTHOT x IDEAS_HACKATHON 2014PTTHOT x IDEAS_HACKATHON 2014
PTTHOT x IDEAS_HACKATHON 2014Liyao Chen
 
Windows 8 apps dev.整理及分享
Windows 8 apps dev.整理及分享Windows 8 apps dev.整理及分享
Windows 8 apps dev.整理及分享Liyao Chen
 

Plus de Liyao Chen (10)

Auto Layout part 1
Auto Layout part 1Auto Layout part 1
Auto Layout part 1
 
iOS Unit testing II
iOS Unit testing IIiOS Unit testing II
iOS Unit testing II
 
iOS Unit test getting stared
iOS Unit test getting starediOS Unit test getting stared
iOS Unit test getting stared
 
Continuous Integration
Continuous  IntegrationContinuous  Integration
Continuous Integration
 
iOS Design to Code - Code
iOS Design to Code - CodeiOS Design to Code - Code
iOS Design to Code - Code
 
iOS Design to Code - Design
iOS Design to Code - DesigniOS Design to Code - Design
iOS Design to Code - Design
 
Beta testing with CI
Beta testing with CIBeta testing with CI
Beta testing with CI
 
PTTHOT x IDEAS_HACKATHON 2014
PTTHOT x IDEAS_HACKATHON 2014PTTHOT x IDEAS_HACKATHON 2014
PTTHOT x IDEAS_HACKATHON 2014
 
選擇
選擇選擇
選擇
 
Windows 8 apps dev.整理及分享
Windows 8 apps dev.整理及分享Windows 8 apps dev.整理及分享
Windows 8 apps dev.整理及分享
 

Dernier

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

KKBOX WWDC17 Notification and Autolayout - Jefferey

  • 1. This presentation is provided on a strictly private and confidential basis for information purposes only. Notification, Auto Layout presented by Jeffery Kao 2017/07/07
  • 3. Notification Short Look What is this notification about? Long Look What extra information is helpful? Quick Actions What actions are appropriate?
  • 9. Rich Notification - Find Friends
  • 11. Rich Notification - KUNA APP In our new iOS app you now have the ability to 3D touch (Force touch) notifications that arrive from Kuna – this will immediately display an animated image of what caused that notification. You can then snooze alerts for two hours, or play a pre-recorded message. If you do not have 3D touch on your phone – you can still swipe left on the notification to view this new feature (iOS 10 only!)
  • 13. Design - Recap Clear description in the short looks Provide extra context in beautifully designed long looks Relevant quick actions
  • 14. Best Practices and What’s New in User Notifications
  • 15. API - Notification Notification Type: - Local Notification - Remote Notification Notification Extension: - Notification Service Extension - Notification Content Extension Purpose: - Location-based, time-based or reminder - Silence Notification
  • 16. Hidden Notification Content Hidden Notification Content: - Extended support all apps - Global setting - Settings per app - API to customize notification content init(identifier: String, actions: [UNNotificationAction], intentIdentifiers: [String], hiddenPreviewsBodyPlaceholder: String, options: UNNotificationCategoryOptions = []) NEW
  • 17. Hidden Notification Content // hiddent notification content let commentCategory = UNNotificationCategory(identifier: "comment-category", actions: [], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: "Comment" // 隱藏後仍然可以看到的body ) NEW
  • 18. Hidden Notification Content // hiddent notification content let commentCategory = UNNotificationCategory(identifier: "comment-category", actions: [], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: "%u Comments" // 隱藏後仍然可以看到的body ) NEW
  • 19. Hidden Notification Content // how about using localization for plural noun? let commentCategory = UNNotificationCategory(identifier: "comment-category", actions: [], intentIdentifiers: [], hiddenPreviewsBodyPlaceholder: NSLocalizedString("COMMENT_KEY", comment: ""), options:[.hiddenPreviewsShowTitle]) NEW
  • 20. Hidden Notification Content - Set “Show Preview” to “Never” or “Authenticated” - Only show “Body placeholder” NEW
  • 22. Customizing Rich Notification - Content extension: init content size ratio - Customized input view - Media button in UNNotificationContentExtension
  • 23. Size Classes and Core Components
  • 24. Table ● Size Classes ● Dynamic Type ● UIKit Components
  • 27. Multiple Screen Sizes Compact Width Compact Height
  • 28. Layout with Different Screen and Font Size Different Screen Size
  • 30. Dynamic Type ● Making custom fonts dynamic ● Example: Etsy
  • 33. Auto Layout Techniques in Interface Builder
  • 34. Table ● Changing Layout At Runtime ● Tracking Touch ● Dynamic Type ● Safe Areas ● Rest of Topics
  • 35. Changing Layout at Runtime BOOL shouldShow = !self.edgeConstraint.active; // Deactivate constraint first to avoid constraint conflict message if (shouldShow) { self.zeroHeightConstraint.active = NO; self.edgeConstraint.active = YES; } else { self.edgeConstraint.active = NO; self.zeroHeightConstraint.active = YES; }
  • 36. Tracking Touch Familiar with CGTransform to track touch event CGAffineTransform = translation + rotation + scale
  • 37. Dynamic Type - Interface Builder -> dynamic Type - set Font size as UIFontTextStyleHeadline | UIFontTextStyleBody … - Dynamically change font size with a proper way: - Xcode -> Open Developer Tool -> Accessibility Inspector -> Font size NEW
  • 38. Safe Areas Safe Areas (iOS11) - Property in UIView - TopLayout, BottomLayout is deprecated - Upgrade automatically with storyboards NEW
  • 41. Safe Areas if #available(iOS 11, *) { let guide = view.safeAreaLayoutGuide NSLayoutConstraint.activate([ view.topAnchor.constraintEqualToSystemSpacingBelow(guide.topAnchor, multiplier: 1.0), guide.bottomAnchor.constraintEqualToSystemSpacingBelow(view.bottomAnchor, multiplier: 1.0)]) } else { // older version let standardSpacing: CGFloat = 8.0 NSLayoutConstraint.activate([ view.topAnchor.constraint(equalTo: topLayoutGuide.bottomAnchor, constant: standardSpacing), bottomLayoutGuide.topAnchor.constraint(equalTo: view.bottomAnchor,constant: standardSpacing)]) } NEW
  • 42. Rest of Topics Proportional Positioning - use spacer view to help you locate your view Stack View Adaptive Layout - hidden property by size class (XCode 9 support) - Use distribution, alignment, and spacing proportional positioning example p.s. standard spacing = 8 which can be used in interface builder
  • 43. Recap Notification: - Some examples for building rich notification - New API about hidden notification content Sizing Class: - Make use of `Dynamic Type` and be aware of device size AutoLayout: - Existing techniques (layout changing in runtime or track touch) - Adapt with new APIs (Safe areas and propotional positioning) - Stack view example
  • 44. References ● Rich Notifications ○ https://developer.apple.com/videos/play/wwdc2017/817 ● Best Practices and What’s New in User Notifications ○ https://developer.apple.com/videos/play/wwdc2017/708 ● Size Classes and Core Components ○ https://developer.apple.com/videos/play/wwdc2017/812 ● Auto Layout Techniques in Interface Builder ○ https://developer.apple.com/videos/play/wwdc2017/412 ● Useful repo: ○ https://github.com/Sweefties/iOS10-NewAPI-UserNotifications-Example ○ https://useyourloaf.com/blog/safe-area-layout-guide/
  • 45. This presentation is provided on a strictly private and confidential basis for information purposes only. THANK YOU