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
git clean -f | |
If you want to also remove directories, run git clean -f -d. | |
If you just want to remove ignored files, run git clean -f -X. | |
If you want to remove ignored as well as non-ignored files, run git clean -f -x. | |
Note the case difference on the X for the two latter commands. | |
If clean.requireForce is set to "true" (the default) in your configuration, then unless you specify -f nothing will actually happen, with a recent enough version of git. |
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
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) { | |
// Load resources for iOS 6.1 or earlier | |
} else { | |
// Load resources for iOS 7 or later | |
} |
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
@implementation UIStoryboard (MyApp) | |
+ (UIStoryboard *)mainStoryboard { | |
return [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; | |
} | |
@end |
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
// Get the storyboard named secondStoryBoard from the main bundle: | |
UIStoryboard *secondStoryBoard = [UIStoryboard storyboardWithName:@"secondStoryBoard" bundle:nil]; | |
// Load the initial view controller from the storyboard. // Set this by selecting 'Is Initial View Controller' on the appropriate view controller in the storyboard. | |
UIViewController *theInitialViewController = [secondStoryBoard instantiateInitialViewController]; | |
// Then push the new view controller in the usual way: | |
[self.navigationController pushViewController:theTabBar animated:YES]; |
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
/ - Quick Add | |
Hold Shift while resizing - Maintain aspect ration | |
Hold Command while moving object - Removes snapping | |
Shift + Direction while an object is selected - Moves object faster | |
Command + Alt + (Shift) + Direction while an object is selected - Resizes object | |
Command + Up/Down - Moves selected layer up or down 1 level | |
Command + (Shift) + Up/Down - Moves selected layer to top or bottom layer | |
Alt + Drag object - Duplicate object | |
Shift + click another object - Add object to current selection | |
Command + click another object - Add object to current selection |
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
//To fetch a branch, you simply need to: | |
git fetch origin | |
//This will fetch all of the remote branches for you. With the remote branches | |
//in hand, you now need to check out the branch you are interested in, giving | |
//you a local working copy: | |
git checkout -b test origin/test |
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
git add -u |
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
git config --global merge.conflictstyle diff3 |
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
#import <Foundation/Foundation.h> | |
@interface MySingleton : NSObject | |
- (id)sharedInstance; | |
@end |
NewerOlder