Added cancel button to icon selection view

This commit is contained in:
michael starke
2013-12-13 01:13:52 +01:00
parent 6b1aff9449
commit 21355101ed
5 changed files with 38 additions and 20 deletions

View File

@@ -26,6 +26,7 @@ NSInteger const kMPDefaultIcon = -1;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
_didCancel = NO;
}
return self;
}
@@ -43,7 +44,13 @@ NSInteger const kMPDefaultIcon = -1;
[self.popover performClose:self];
}
- (IBAction)cancel:(id)sender {
self.didCancel = YES;
[self.popover performClose:self];
}
- (void)reset {
self.didCancel = NO;
self.selectedIcon = kMPDefaultIcon;
}