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
[[[[[NSNotificationCenter defaultCenter] rac_addObserverForName:UIKeyboardWillChangeFrameNotification | |
object:nil] takeUntil:[self rac_willDeallocSignal]] deliverOnMainThread] subscribeNext:^(NSNotification *notification) { | |
CGRect keyboardFrame = [[notification userInfo][UIKeyboardFrameEndUserInfoKey] CGRectValue]; | |
CGRect frameOfScreen = [UIScreen mainScreen].bounds; | |
}]; |
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]; | |
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Screen Shot 2013-07-23 at 5.29.05 PM.png"]]; | |
UIView *viewWithMask = [[UIView alloc] initWithFrame:CGRectMake(0, 200, self.view.frame.size.width, 100)]; | |
[viewWithMask setBackgroundColor:[UIColor greenColor]]; | |
// Recreate gradient mask with new fade length | |
CAGradientLayer *gradientMask = [CAGradientLayer layer]; | |
gradientMask.bounds = viewWithMask.layer.bounds; | |
gradientMask.position = CGPointMake(CGRectGetMidX(viewWithMask.bounds), CGRectGetMidY(viewWithMask.bounds)); |
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
- (UIImage *)fixRotation:(UIImage *)image | |
{ | |
if (image.imageOrientation == UIImageOrientationUp) | |
{ | |
return image; | |
} | |
CGAffineTransform transform = CGAffineTransformIdentity; | |
switch (image.imageOrientation) | |
{ |
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)loadView | |
{ | |
[super view]; | |
} | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[self setEdgesForExtendedLayout:UIRectEdgeBottom]; | |
[self p_configureNavigationBar]; |
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]; | |
_pageControl = [[UIPageControl alloc] init]; | |
[self.pageControl setCurrentPage:0]; | |
[self.pageControl setNumberOfPages:6]; | |
[self.pageControl addTarget:self action:@selector(a_changedPageControl:) forControlEvents:UIControlEventValueChanged]; | |
[self.view addSubview:self.pageControl]; | |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>IDECodeSnippetCompletionPrefix</key> | |
<string>@weakselfnotnil</string> | |
<key>IDECodeSnippetCompletionScopes</key> | |
<array> | |
<string>CodeExpression</string> | |
</array> |
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)p_configureNavigationController | |
{ | |
[[[self navigationController] navigationBar] setTintColor:[UIColor colorWithRed:0.949 green:0.957 blue:0.961 alpha:1.000]]; | |
// Left Button | |
UIView *leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)]; | |
[leftView setBackgroundColor:[UIColor clearColor]]; | |
UIButton *leftViewButton = [UIButton buttonWithType:UIButtonTypeCustom]; | |
[leftViewButton setFrame:CGRectMake(0, 0, 30, 30)]; | |
[leftViewButton addTarget:self action:@selector(a_pressedNavigationButtonLeft) forControlEvents:UIControlEventTouchUpInside]; |
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
#ifdef INJECTION_ENABLED | |
[[NSNotificationCenter defaultCenter] addObserverForName:kINNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { | |
}]; | |
#endif |
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)initWithFrame:(CGRect)frame | |
{ | |
self = [super initWithFrame:frame]; | |
if (self) | |
{ | |
[self p_configureView]; | |
[self p_configureConstraints]; | |
} | |
return self; |
OlderNewer