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
UISS Blitz Talk
Search
Robert Wijas
March 04, 2013
Programming
0
120
UISS Blitz Talk
Blitz Talk about UISS library from NSConference 2013.
Robert Wijas
March 04, 2013
Tweet
Share
More Decks by Robert Wijas
See All by Robert Wijas
UISS
robertwijas
0
110
The Lean Startup
robertwijas
0
150
Pomodoro Blitz Talk
robertwijas
2
160
Pomodoro
robertwijas
0
110
Other Decks in Programming
See All in Programming
CSC509 Lecture 08
javiergs
PRO
0
110
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.7k
GCCのプラグインを作る / I Made a GCC Plugin
shouth
1
150
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
160
現場で役立つモデリング 超入門
masuda220
PRO
13
2.9k
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
870
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
130
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
440
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
260
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
23
11k
CSC509 Lecture 09
javiergs
PRO
0
110
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Designing for Performance
lara
604
68k
Facilitating Awesome Meetings
lara
49
6k
Designing for humans not robots
tammielis
249
25k
What's in a price? How to price your products and services
michaelherold
243
12k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
14
1.9k
Testing 201, or: Great Expectations
jmmastey
38
7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
RailsConf 2023
tenderlove
29
880
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
Transcript
UIAppearance on Steroids UISS Robert Wijas
Quick introduction UIAppearance
@protocol UIAppearance <NSObject> ! + (id)appearance; ! + (id)appearanceWhenContainedIn:(Class <UIAppearanceContainer>)ContainerClass,
... NS_REQUIRES_NIL_TERMINATION; ! @end ! @protocol UIAppearanceContainer <NSObject> @end #define UI_APPEARANCE_SELECTOR ! - (void)setProperty:(PropertyType)property forAxis1:(IntegerType)axis1 axisN:(IntegerType)axisN; ! - (PropertyType)propertyForAxis1:(IntegerType)axis1 axisN:(IntegerType)axisN; Protocols Properties
[[UIButton appearance] setTitleColor:[[UIColor whiteColor] colorWithAlphaComponent:0.800] forState:UIControlStateNormal]; [[UIButton appearance] setTitleColor:[UIColor whiteColor]
forState:UIControlStateHighlighted]; [[UIButton appearance] setBackgroundImage:[[UIImage imageNamed:@"button-background-normal"] resizableImageWithCapInsets:UIEdgeInsetsMake(0.0, 10.0, 0.0, 10.0)] forState:UIControlStateNormal]; [[UIButton appearance] setBackgroundImage:[[UIImage imageNamed:@"button-background-highlighted"] resizableImageWithCapInsets:UIEdgeInsetsMake(0.0, 10.0, 0.0, 10.0)] forState:UIControlStateHighlighted]; [[UILabel appearanceWhenContainedIn:[UIButton class], nil] setFont:[UIFont fontWithName:@"Copperplate-Bold" size:18.0]]; [[UIButton appearance] setTitleEdgeInsets:UIEdgeInsetsMake(1.0, 0.0, 0.0, 0.0)];
UISS JSON Syntax
UISS JSON Syntax "UIButton":{ "titleColor:normal":["white", 0.8], "titleColor:highlighted":"white", ! "backgroundImage:normal": ["button-background-normal",
[0,10,0,10]], "backgroundImage:highlighted": ["button-background-highlighted", [0,10,0,10]], ! "titleEdgeInsets": [1,0,0,0], ! "UILabel":{ "font":["Copperplate-Bold", 18] } }
"UIButton":{ "titleColor:normal":["white", 0.8], "titleColor:highlighted":"white", ! "backgroundImage:normal": ["button-background-normal", [0,10,0,10]], "backgroundImage:highlighted": ["button-background-highlighted",
[0,10,0,10]], ! "titleEdgeInsets": [1,0,0,0], ! "UILabel":{ "font":["Copperplate-Bold", 18] } } UIAppearance objects and containment
"UIButton":{ "titleColor:normal":["white", 0.8], "titleColor:highlighted":"white", ! "backgroundImage:normal": ["button-background-normal", [0,10,0,10]], "backgroundImage:highlighted": ["button-background-highlighted",
[0,10,0,10]], ! "titleEdgeInsets": [1,0,0,0], ! "UILabel":{ "font":["Copperplate-Bold", 18] } } Properties
"UIButton":{ "titleColor:normal":["white", 0.8], "titleColor:highlighted":"white", ! "backgroundImage:normal": ["button-background-normal", [0,10,0,10]], "backgroundImage:highlighted": ["button-background-highlighted",
[0,10,0,10]], ! "titleEdgeInsets": [1,0,0,0], ! "UILabel":{ "font":["Copperplate-Bold", 18] } } Axis parameters
"clear" [UIColor clearColor] ! ["#ffffff", 0.5] [UIColor colorWithRed:255.0f green:255.0f blue:255.0f
alpha:0.5f] ! [0, 255, 255, 0.5] [UIColor colorWithRed:0.0f green:255.0f blue:255.0f alpha:0.5f] Colors
14 [UIFont systemFontOfSize:14.0f] ! ["bold", 14] [UIFont boldSystemFontOfSize:14.0f] ! ["Georgia-Italic",
12] [UIFont fontWithName:@"Georgia-Italic" size:12.0f] Fonts
"imageName" [UIImage imageNamed:@"imageName"] ! ["imageName", 1, 2, 3, 4] [[UIImage
imageNamed:@"imageName"] resizableImageWithCapInsets:UIEdgeInsetsMake(1, 2, 3, 4)] Images
"UINavigationBar":{ "Phone":{ "tintColor":"gray" }, "Pad":{ "tintColor":"lightGray" } } UI Idiom
Branches
"Variables":{ "tint":"blue", “toolbar”:{ "tintColor": "$tint" } }, "UINavigationBar":{ "tintColor": "$tint"
}, "UITabBar":{ "tintColor": "$tint" }, "UIToolbar":”$toolbar” Variables
"UISSDemoViewController":{ "-UIButton":{ "titleColor:normal":["white", 0.8], "titleColor:highlighted":"white" } } Comments
Simple Setup
one line of code Simple Setup
Simple Setup [UISS configureWithDefaultJSONFile]; uiss.json
Status Bar
Status Bar self.uiss = [UISS configureWithDefaultJSONFile]; self.uiss.statusWindowEnabled = YES;
None
None
Release configuration ?
Release configuration Generated Code
None
How to make it really cool?
How to make it really cool? Live updates
None
None
Remote Style [UISS configureWithDefaultJSONFile]
Remote Style [UISS configureWithURL:[NSURL URLWithString:@"http://localhost/uiss.json"]]
None
Custom Views UIAppearance
UISS Architecture Goals
lightweight UISS Architecture Goals
lightweight UISS Architecture Goals minimal dependency
lightweight UISS Architecture Goals powered by UIAppearance minimal dependency
http://github.com/robertwijas/UISS CocoaPods
None
robertwijas
None