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
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) |
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
MBProgressHUD* hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; | |
[hud setMode:MBProgressHUDModeText]; | |
[hud setLabelText:@"Running latest version, sweet!"]; | |
[hud hide:YES afterDelay:2.0]; |
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
-fno-objc-arc |
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
export DEVELOPER_DIR="/Applications/XCode.app/Contents/Developer" | |
alias symbolicate="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash -v" | |
symbolicate -o "AppCrash.txt" "CrashLog-E06B8427-F47D-487F-80B7-0D84733ED435-6032-000007E67F99442A.txt" "MyApp.app" |
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
if (viewController.isViewLoaded && viewController.view.window) { | |
// viewController is visible | |
} |
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
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); | |
NSString *documentsDirectory = [paths objectAtIndex:0]; | |
NSString *fileName =[NSString stringWithFormat:@"%@.log",[NSDate date]]; | |
NSString *logFilePath = [documentsDirectory stringByAppendingPathComponent:fileName]; | |
freopen([logFilePath cStringUsingEncoding:NSASCIIStringEncoding],"a+",stderr); |
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
openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem | |
openssl pkcs12 -nocerts -out PushChatKey.pem -in PushChatKey.p12 | |
cat PushChatCert.pem PushChatKey.pem > ck.pem | |
php simplepush.php | |
telnet gateway.sandbox.push.apple.com 2195 |
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
CGPoint location = [gesture locationInView:self.uiTableView]; | |
NSIndexPath *swipedIndexPath = [self.uiTableView indexPathForRowAtPoint:location]; | |
UITableViewCell *swipedCell = [self.uiTableView cellForRowAtIndexPath:swipedIndexPath]; |
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
imageView.image = [UIImage imageWithData:fileData]; | |
imageView.layer.cornerRadius = 50.0f; | |
imageView.layer.masksToBounds = YES; | |
imageView.layer.borderColor = [BC_LIGHTBLUE CGColor]; | |
imageView.layer.borderWidth = 2.0; |
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)layoutCustomBordersForUITextFields { | |
for (UIView *view in [self.detailScrollView subviews]) { | |
if ([view isKindOfClass:[UITextField class]]) { | |
UITextField *textField = (UITextField *)view; | |
NSLog(@"textField = %d", textField.tag); | |
UIView *bottomBorder = [[UIView alloc] initWithFrame:CGRectMake(textField.frame.origin.x, textField.frame.origin.y + textField.frame.size.height - 1, 320, 1)]; | |
bottomBorder.backgroundColor = [UIColor colorWithWhite:0.800 alpha:1.000]; | |
[self.detailScrollView addSubview:bottomBorder]; | |
} | |
} |