Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Xamarin.iOS - AutoLayout + iOS 9
Search
Cyril
May 19, 2016
Programming
0
450
Xamarin.iOS - AutoLayout + iOS 9
Nouveautés d'AutoLayout avec iOS 9 :
- NSLayoutAnchor
- UILayoutGuide
- UIStackView
Cyril
May 19, 2016
Tweet
Share
More Decks by Cyril
See All by Cyril
Salut .NET 5, quoi de neuf ?
cyrilcathala
0
64
Annonces de la .NET Conf 2019
cyrilcathala
0
68
Build 2018 - Xamarin
cyrilcathala
1
46
Microsoft Build 2017 Mobile Wrap-Up
cyrilcathala
0
130
Mobile Deep Linking
cyrilcathala
0
120
Programmation Réactive - Reactive Extensions
cyrilcathala
0
73
Other Decks in Programming
See All in Programming
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.6k
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
120
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
390
CSC307 Lecture 12
javiergs
PRO
0
460
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
240
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
120
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
150
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
230
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.5k
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8k
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
370
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
360
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
200
Making the Leap to Tech Lead
cromwellryan
135
9.8k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
61
52k
The Invisible Side of Design
smashingmag
302
51k
Fireside Chat
paigeccino
42
3.8k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Music & Morning Musume
bryan
47
7.1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
610
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Exploring anti-patterns in Rails
aemeredith
2
280
KATA
mclloyd
PRO
35
15k
Transcript
AUTOLAYOUT IOS 9 Meetup Cross-Platform Native Mobile Dev Cyril CATHALA
@CyrilCathala
84% des devices sous iOS 9 (9 mai 2016) iOS
9; 84% iOS 8; 11% Earlier; 5%
iOS 9 3D Touch SFSafariViewController Spotlight Contacts APIs UIKit
nouveautés du UIKIT
NSLAYOUTANCHOR UILAYOUTGUIDE UISTACKVIEW
API de contraintes avec NSLAYOUTANCHOR
J’ADORE CONSTRUIRE MES VUES ET CONTRAINTES VIA CODE, JE FAIS
ÇA PARTOUT ! Un développeur maso
OH NON, OBLIGÉ DE GÉRER MES CONTRAINTES DANS LE CODE
… Un développeur malchanceux
C’ÉTAIT MIEUX AVANT ?
NSLAYOUTCONSTRAINT var constraint = NSLayoutConstraint.Create( button2, NSLayoutAttribute.Leading, NSLayoutRelation.Equal, button1, NSLayoutAttribute.Trailing,
1, 15); button1 button2 15
None
VISUAL FORMAT LANGUAGE (VFL) var constraints = NSLayoutConstraint.FromVisualFormat( @”H:|-[button1(==button2)]-15-[button2]-|", NSLayoutFormatOptions.AlignAllTop,
null, views); button1 button2 15
None
Qui dit mieux ? NSLAYOUTANCHOR !
var constraint = NSLayoutConstraint.Create( button2, NSLayoutAttribute.Leading, NSLayoutRelation.Equal, button1, NSLayoutAttribute.Trailing, 1,
15); button2.LeadingAnchor.ConstraintEqualTo(button1.TrailingAnchor, 15);
DEMO TIME ! NsLayoutAnchor
meilleur agencement avec UILAYOUTGUIDE
JE VEUX CENTRER UN GROUPE DE VUES AU MILIEU DE
L’ÉCRAN ! Solution : Créer une UIView qui contient les vues, puis centrer la UIView
JE VEUX AJOUTER DES ESPACES DYNAMIQUES ENTRE MES VUES !
Solution : Créer des UIViews pour chaque espace, puis associer des contraintes
PROBLÈME : Ajout d’éléments inutiles dans la hiérarchie visuelle
UILAYOUTGUIDE N’intervient pas dans la hiérarchie visuelle ! Bémol :
pas dispo dans le designer
var guide = new UILayoutGuide(); View.AddLayoutGuide(guide); guide.LeadingAnchor .ConstraintEqualTo(View.LeadingAnchor) .Active =
true;
DEMO TIME ! UILayoutGuide
la révolution avec UISTACKVIEW
STACK VIEW Empile des vues Horizontal ou Vertical Basé sur
Auto Layout Imbricable !
ALIGNMENT SPACING DISTRIBUTION
DISTRIBUTION Fill FillEqually FillProportionnally EqualSpacing EqualCentering
ALIGNMENT Fill Center Leading Trailing Top Bottom
ALIGNMENT BASELINE FirstBaseline LastBaseline
WE FEEL THAT YOU CAN BUILD MOST OF YOUR USER
INTERFACES WITH STACK VIEWS, SO WE RECOMMEND STARTING WITH STACK VIEW AND USING CONSTRAINTS AS NEEDED. Jason Yao, Ingénieur Apple, WWDC 2015
DEMO TIME ! Stack View
APIS • AddArrangedSubview • RemoveArrangedSubview • Qui n’enlève pas de
l’arborescence visuelle ! • ArrangedSubviews • Compatible avec les animations
JE DOIS CIBLER IOS 7, JE SUIS TRISTESSE :’( Un
développeur malheureux
None
Mysteries of Auto Layout 1 & 2 https://developer.apple.com/videos/play/wwdc2015/218 Paul Hudson
sur Youtube Doc Xamarin https://developer.xamarin.com/guides/ios/platform_features/introductio n_to_ios9/uistackview
MERCI ! @CYRILCATHALA