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
| NSRunAlertPanel(@"Tracker already running", @"The Tracker is already running.", @"OK", nil, nil); |
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
| @throw [NSException exceptionWithName:@"GAJSException" | |
| reason:@"Failed to load JavaScriptEngine" | |
| userInfo:nil]; |
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
| static NSString* GAEscapeNSString(NSString* value) { | |
| if (!value) return nil; | |
| const char *chars = [value UTF8String]; | |
| NSMutableString *escapedString = [NSMutableString string]; | |
| while (*chars) { | |
| if (*chars == '\\') { | |
| [escapedString appendString:@"\\\\"]; | |
| } else if (*chars == '\'') { | |
| [escapedString appendString:@"\\'"]; | |
| } else { |
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
| [NSKeyedArchiver archiveRootObject:Object toFile:filePath] | |
| [NSKeyedUnarchiver unarchiveObjectWithFile:filePath] |
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
| @synchronized(self) { | |
| // Code here will be execute by only one thread. | |
| } |
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
| NSDate* now = [NSDate date]; | |
| NSDateComponents* ageComponents = [[NSCalendar currentCalendar] | |
| components:NSYearCalendarUnit | |
| fromDate:self.birthday | |
| toDate:now | |
| options:0]; | |
| NSInteger age = [ageComponents year]; |
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
| git rm --cached ProjectFolder.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstate | |
| git commit -m "Removed file that shouldn't be tracked" |
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
| *.app | |
| build/ | |
| .DS_Store | |
| *~ | |
| .LSOverride | |
| *.xcuserdatad | |
| *.xcworkspace |
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
| NSObject | |
| Sending Messages | |
| – performSelector:withObject:afterDelay: | |
| – performSelector:withObject:afterDelay:inModes: | |
| – performSelectorOnMainThread:withObject:waitUntilDone: | |
| – performSelectorOnMainThread:withObject:waitUntilDone:modes: | |
| – performSelector:onThread:withObject:waitUntilDone: | |
| – performSelector:onThread:withObject:waitUntilDone:modes: | |
| – performSelectorInBackground:withObject: | |
| + cancelPreviousPerformRequestsWithTarget: |
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)applicationDidBecomeActive:(UIApplication *)application | |
| { | |
| application.applicationIconBadgeNumber = 0; | |
| } |