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
| NSMutableArray* array = [NSMutableArray mutableArray]; | |
| [array addObject:[NSValue valueWithCGRect:CGRectMake(0,0,10,10)]]; | |
| CGRect someRect = [[array objectAtIndex:0] CGRectValue]; |
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
| view.layer.cornerRadius = 10.0f; |
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
| _subtitleTextView.layer.shadowOffset = CGSizeMake(3.0f, 3.0f); | |
| _subtitleTextView.layer.shadowColor = [[UIColor blackColor] CGColor]; | |
| _subtitleTextView.layer.shadowOpacity = 1.0f; | |
| _subtitleTextView.layer.shadowRadius = 0.0f; | |
| _subtitleTextView.textColor = [UIColor whiteColor]; | |
| _subtitleTextView.alpha = 1.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
| UIAlertView *alertView = [UIAlertView alertViewWithTitle:@"Alert" message:@"Are you sure?"]; | |
| [alertView addButtonWithTitle:@"Yes" handler:^{ | |
| // YES | |
| }]; | |
| [alertView addButtonWithTitle:@"No" handler:^{ | |
| // NO | |
| }]; | |
| [alertView show]; |
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
| dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_current_queue(), ^{ | |
| //// will be executed after 1 second | |
| }); |
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 SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) | |
| #define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height) | |
| #define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue] | |
| #define CurrentSystemVersion ([[UIDevice currentDevice] systemVersion]) | |
| #define CurrentLanguage ([[NSLocale preferredLanguages] objectAtIndex:0]) | |
| //use dlog to print while in debug model | |
| #ifdef DEBUG | |
| # define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); |
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
| NSLog(@"%@", [UIFont fontNamesForFamilyName:@"Helvetica"]); |
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 *fontName = self.label.font.fontName; | |
| CGFloat fontSize = self.label.font.pointSize; |
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
| NSSortDescriptor *sortNameDescriptor = [[NSSortDescriptor alloc] initWithKey:@"firstName" ascending:YES]; | |
| [company.workers sortedArrayUsingDescriptors:@[sortNameDescriptor]]; |
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
| find . ! -wholename '*Vendor*' -name "*.h" -exec cat {} \; | wc -l |