mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-18 11:09:24 +00:00
Added cancel button to icon selection view
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user