add a button to the extension view for testing

This commit is contained in:
Mazyad Alabduljaleel 2015-10-10 14:30:59 -07:00
parent 164eedaad4
commit 008a4dbea3
1 changed files with 15 additions and 1 deletions

View File

@ -45,8 +45,15 @@
if (!self.disableExtensionView)
{
view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 44.f)];
view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 100.f)];
view.backgroundColor = [UIColor redColor];
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
button.frame = view.bounds;
[button addTarget:self action:@selector(extensionViewTapped:) forControlEvents:UIControlEventTouchUpInside];
[button setTitle:@"Click Me!" forState:UIControlStateNormal];
[view addSubview:button];
}
/* Library code */
@ -67,4 +74,11 @@
self.scrollView.contentSize = self.imageView.bounds.size;
}
#pragma mark - Action methods
- (void)extensionViewTapped:(id)sender
{
[[[UIAlertView alloc] initWithTitle:@"it works" message:nil delegate:nil cancelButtonTitle:@"OK!" otherButtonTitles:nil] show];
}
@end