Update examples to use UIControlState (#3013)

This commit is contained in:
Adlai Holler
2017-02-10 13:35:15 -08:00
committed by GitHub
parent 2dca7a0c8d
commit 7424b6d7f7
7 changed files with 18 additions and 18 deletions

View File

@@ -198,8 +198,8 @@ typedef ASLayoutSpec *(^OverviewDisplayNodeSizeThatFitsBlock)(ASSizeRange constr
// Set title for button node with a given font or color. If you pass in nil for font or color the default system
// font and black as color will be used
[buttonNode setTitle:@"Button Title Normal" withFont:nil withColor:[UIColor blueColor] forState:ASControlStateNormal];
[buttonNode setTitle:@"Button Title Highlighted" withFont:[UIFont systemFontOfSize:14] withColor:nil forState:ASControlStateHighlighted];
[buttonNode setTitle:@"Button Title Normal" withFont:nil withColor:[UIColor blueColor] forState:UIControlStateNormal];
[buttonNode setTitle:@"Button Title Highlighted" withFont:[UIFont systemFontOfSize:14] withColor:nil forState:UIControlStateHighlighted];
[buttonNode addTarget:self action:@selector(buttonPressed:) forControlEvents:ASControlNodeEventTouchUpInside];
parentNode = [self centeringParentNodeWithChild:buttonNode];