This file contains hidden or 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
- (NSString *)description | |
{ | |
return [NSString stringWithFormat:@"<%@: %p, data=%@>", | |
NSStringFromClass([self class]), self, [self data]]; | |
} |
This file contains hidden or 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 ViewController () | |
@property (nonatomic, strong) ReaderIssueView *issueView; | |
@end | |
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | |
{ | |
self.thePopover = [(UIStoryboardPopoverSegue *)segue popoverController]; | |
} |
This file contains hidden or 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
#pragma mark - Application's Documents directory | |
- (NSURL *)applicationDocumentsDirectory | |
{ | |
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; | |
} |
This file contains hidden or 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
convert origin.png -background black -alpha background -channel a -negate +channel converted.png |
This file contains hidden or 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)viewWillLayoutSubviews | |
{ | |
[super viewWillLayoutSubviews]; | |
self.view.superview.bounds = CGRectMake(0, 0, 100.0f, 100.0f); | |
[[self.view.superview layer] setCornerRadius:5.0f]; | |
[[self.view.superview layer] setMasksToBounds:YES]; | |
} |
This file contains hidden or 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)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillShown:) | |
name:UIKeyboardWillShowNotification object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillBeHidden:) |
This file contains hidden or 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]; | |
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; | |
UIVisualEffectView *blurView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; | |
UIVibrancyEffect *vibrancyEffect = [UIVibrancyEffect effectForBlurEffect:blurEffect]; | |
UIVisualEffectView *vibrancyView = [[UIVisualEffectView alloc] initWithEffect:vibrancyEffect]; | |
This file contains hidden or 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
#import "UIResponder+FirstResponder.h" | |
static __weak id currentFirstResponder; | |
@implementation UIResponder (FirstResponder) | |
+ (id)currentFirstResponder | |
{ | |
currentFirstResponder = nil; | |
[[UIApplication sharedApplication] sendAction:@selector(findFirstResponder:) to:nil from:nil forEvent:nil]; |
This file contains hidden or 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 Person | |
@property NSString *name; | |
@property NSDate *birthday; | |
- (BOOL)isEqualToPerson:(Person *)person; | |
@end | |
@implementation Person | |
- (BOOL)isEqualToPerson:(Person *)person { |
This file contains hidden or 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
#import "LoginSegue.h" | |
@implementation LoginSegue | |
- (void)perform | |
{ | |
UIViewController *sourceViewController = self.sourceViewController; | |
UIViewController *destinationViewController = self.destinationViewController; | |
UIWindow *window = [[[UIApplication sharedApplication] delegate] window]; |
OlderNewer