Permalink
Browse files

update demo for iOS 7

  • Loading branch information...
1 parent 8628078 commit e4e909d4ef7141d12e2d4dce8fa659c1ef08761a @lavoy committed Oct 17, 2013
Showing with 6 additions and 4 deletions.
  1. +2 −0 Demo/ALActionBlocks.xcodeproj/project.pbxproj
  2. +4 −4 Demo/ALActionBlocks/ALViewController.m
@@ -285,6 +285,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ALActionBlocks/ALActionBlocks-Prefix.pch";
INFOPLIST_FILE = "ALActionBlocks/ALActionBlocks-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
@@ -297,6 +298,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ALActionBlocks/ALActionBlocks-Prefix.pch";
INFOPLIST_FILE = "ALActionBlocks/ALActionBlocks-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
@@ -24,21 +24,21 @@ - (void)viewDidLoad {
self.title = @"ALActionBlocks";
self.button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
- self.button.frame = CGRectMake(60, 44, 200, 44);
+ self.button.frame = CGRectMake(60, 44 + 64, 200, 44);
[self.button setTitle:@"Start" forState:UIControlStateNormal];
[self.button handleControlEvents:UIControlEventTouchUpInside withBlock:^(UIButton *weakButton) {
NSLog(@"buttton pressed: %@", [weakButton titleForState:UIControlStateNormal]);
}];
[self.view addSubview:self.button];
- UISwitch *aSwitch = [[UISwitch alloc] initWithFrame:CGRectMake(120, 132, 0, 0)];
+ UISwitch *aSwitch = [[UISwitch alloc] initWithFrame:CGRectMake(120, 132 + 64, 0, 0)];
[aSwitch handleControlEvents:UIControlEventValueChanged withBlock:^(id weakControl) {
NSLog(@"value: %d", aSwitch.isOn);
}];
[self.view addSubview:aSwitch];
UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:@[@"One", @"Two", @"Three"]];
- segmentedControl.frame = CGRectMake(88, 220, 143, 30);
+ segmentedControl.frame = CGRectMake(88, 220 + 64, 143, 30);
segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
[segmentedControl handleControlEvents:UIControlEventValueChanged withBlock:^(id weakControl) {
NSLog(@"selected segment: %@", [segmentedControl titleForSegmentAtIndex:segmentedControl.selectedSegmentIndex]);
@@ -56,7 +56,7 @@ - (void)viewDidLoad {
NSLog(@"add");
}];
- UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 88, self.view.frame.size.width, 44)];
+ UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 44, self.view.frame.size.width, 44)];
[self.view addSubview:toolbar];
UIBarButtonItem *powButton = [[UIBarButtonItem alloc] init];

0 comments on commit e4e909d

Please sign in to comment.