This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface NSResponder | |
- (id)supplementalTargetForAction:(SEL)action sender:(id)sender NS_AVAILABLE_MAC(10_7); | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id target = [self targetForAction:@selector(myAction:) sender:self]; | |
[target myAction:self]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface UIResponder | |
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender; | |
- (id)targetForAction:(SEL)action withSender:(id)sender NS_AVAILABLE_IOS(7_0); | |
@end | |
@interface UIApplication | |
- (BOOL)sendAction:(SEL)action to:(id)target from:(id)sender forEvent:(UIEvent *)event; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface NSResponder | |
- (BOOL)tryToPerform:(SEL)anAction with:(id)anObject; | |
- (void)doCommandBySelector:(SEL)aSelector; | |
@end | |
@interface NSApplication | |
- (BOOL)sendAction:(SEL)theAction to:(id)theTarget from:(id)sender; | |
- (id)targetForAction:(SEL)theAction to:(id)theTarget from:(id)sender; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)disableVibrancyForPopover:(NSPopover *)popover { | |
NSAppearance *appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; | |
popover.appearance = appearance; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSURL *)URLFromWeblocFileData:(NSData *)data { | |
NSDictionary *dict = [NSPropertyListSerialization propertyListWithData:data | |
options:NSPropertyListImmutable | |
format:NULL | |
error:NULL]; | |
NSString *urlString = dict[@"URL"]; | |
return [NSURL URLWithString:urlString]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
for (NSViewController *aController in self.childViewControllers) { | |
if ([aController.view isDescendantOf:self.containerView]) { | |
self.contentViewController = aController; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
for (NSViewController *aController in self.childViewControllers) { | |
NSString *identifier = [aController identifier]; | |
if ([identifier isEqualToString:@"master"]) { | |
self.masterViewController = aController; | |
} | |
else if ([identifier isEqualToString:@"detail"]) { | |
self.detailViewController = aController; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | |
if ([segue.identifier isEqualToString:@"contained"]) { | |
self.contentViewController = segue.destinationViewController; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)windowDidLoad { | |
NSSplitViewController *splitViewController = (NSSplitViewController *)self.rootViewController; | |
self.masterViewController = (MyMasterViewController *)splitViewController.childViewControllers[0]; | |
self.detailViewController = (MyDetailViewController *)splitViewController.detailViewControllers[1]; | |
} |
NewerOlder