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
https://gist.github.com/1033072 |
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
game-mute-on |
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
layer |
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
CGRectGetWidth(startSegment.frame) |
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
henFrame |
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
toolBarHeight |
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
// List all fonts on iPhone | |
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
NSArray *fontNames; | |
NSInteger indFamily, indFont; | |
for (indFamily=0; indFamily<[familyNames count]; ++indFamily) | |
{ | |
NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]); | |
fontNames = [[NSArray alloc] initWithArray: | |
[UIFont fontNamesForFamilyName: | |
[familyNames objectAtIndex:indFamily]]]; |
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
+(NSString*)getOnlyNumbersFromString:(NSString*)stringToStrip{ | |
NSMutableString *strippedString = [NSMutableString | |
stringWithCapacity:stringToStrip.length]; | |
NSScanner *scanner = [NSScanner scannerWithString:stringToStrip]; | |
NSCharacterSet *numbers = [NSCharacterSet | |
characterSetWithCharactersInString:@"0123456789"]; | |
while ([scanner isAtEnd] == NO) { | |
NSString *buffer; |
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
+(NSString*)currentLang{ | |
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | |
NSArray *languages = [defaults objectForKey:@"AppleLanguages"]; | |
return [languages objectAtIndex:0]; | |
} |
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
+ (BOOL)isDeviceAniPad { | |
#ifdef UI_USER_INTERFACE_IDIOM | |
return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); | |
#else | |
return NO; | |
#endif | |
} |
NewerOlder