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
| typedef enum { | |
| NotiContact=0, | |
| NotiChatNoti, | |
| NotiMyNoti | |
| } NotiSelect; | |
| //Colors | |
| #define COLOR(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1] | |
| #define COLOR_BACKGROUND [UIColor colorWithRed:(230.0/255) green:(224.0/255) blue:(202.0/255) 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
| -(NSString *)StringFromDate:(NSDate *)DateLocal{ | |
| NSDateFormatter *prefixDateFormatter = [[[NSDateFormatter alloc] init] autorelease]; | |
| [prefixDateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4]; | |
| [prefixDateFormatter setDateFormat:@"MMMM d., yyyy"];//June 13th, 2013 | |
| NSString * prefixDateString = [prefixDateFormatter stringFromDate:DateLocal]; | |
| NSDateFormatter *monthDayFormatter = [[[NSDateFormatter alloc] init] autorelease]; | |
| [monthDayFormatter setFormatterBehavior:NSDateFormatterBehavior10_4]; | |
| [monthDayFormatter setDateFormat:@"d"]; | |
| int date_day = [[monthDayFormatter stringFromDate:DateLocal] intValue]; |
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
| { | |
| "USD": { | |
| "symbol": "$", | |
| "name": "US Dollar", | |
| "symbol_native": "$", | |
| "decimal_digits": 2, | |
| "rounding": 0, | |
| "code": "USD", | |
| "name_plural": "US dollars" | |
| }, |
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 - | |
| #pragma mark - Creating Object | |
| -(id)createObjectForEntity:(NSString *)entityName | |
| { | |
| if (entityName!=nil || [entityName isEqualToString:@""]) | |
| { | |
| return [NSEntityDescription | |
| insertNewObjectForEntityForName:entityName | |
| inManagedObjectContext:appDelegate.managedObjectContext]; |
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 - | |
| # pragma mark - Scale and Rotate according to Orientation | |
| - (UIImage *)scaleAndRotateImage:(UIImage *)image | |
| { | |
| int kMaxResolution = 450; // Or whatever | |
| CGImageRef imgRef = image.CGImage; | |
| CGFloat width = CGImageGetWidth(imgRef); |