add a button to the extension view for testing
This commit is contained in:
parent
164eedaad4
commit
008a4dbea3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue