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
this is the perfect gist |
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
ladidas test |
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)initialize | |
{ | |
NSError *error = nil; | |
[[self class] jr_swizzleClassMethod:@selector(imageNamed:) withClassMethod:@selector(gk_imageNamed:) error:&error]; | |
} | |
+ (UIImage *)gk_imageNamed:(NSString *)str | |
{ | |
UIImage *image = [UIImage gk_imageNamed:str]; | |
if (!image && [str rangeOfString:@".jpg"].location == NSNotFound) { |
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
Making right turns on red signals after stopping (and ensuring the path is clear of pedestrians and oncoming traffic) is allowed in most states, unless there is a specific restriction posted at the intersection or the traffic lights show a red arrow in place of the standard red light. Some areas will allow you to make a left turn on red going from a one-way street onto another one-way street. (Note: There is no "Right on Red" in New York City.) |
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
- (id)initWithFrame:(CGRect)frame { | |
if ((self = [super initWithFrame:frame])) { | |
UIImage *image = [[SMImageCacher instance] imageWithName:@"sectionHeader"]; | |
self.textPadding = UIEdgeInsetsMake(0, 10, 0, 90); | |
self.font = [UIFont boldSystemFontOfSize:17]; | |
self.textColor = [UIColor whiteColor]; | |
self.backgroundColor = [UIColor colorWithPatternImage:image]; | |
self.shadowOffset = CGSizeMake(0, 1); | |
self.shadowColor = [[UIColor blackColor] colorWithAlphaComponent:0.5]; | |
self.userInteractionEnabled = 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) performFakeMemoryWarning { | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
SEL memoryWarningSel = @selector(_performMemoryWarning); | |
if ([[UIApplication sharedApplication] respondsToSelector:memoryWarningSel]) { | |
[[UIApplication sharedApplication] performSelector:memoryWarningSel]; | |
NSLog(@"Memory Warning!!"); | |
} | |
[pool release]; | |
} |
NewerOlder