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 |
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
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
/ - 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
// 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
@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
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
git push --all | |
git push --tags |
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
1. Duplicate your iPhone-Storyboard and rename it MainStoryboard_iPad.storyboard | |
2. Open this file any text editor. | |
3. Search for targetRuntime="iOS.CocoaTouch"and change it to targetRuntime="iOS.CocoaTouch.iPad" | |
4. Now save everything and reopen Xcode -> the iPad-Storyboard contains the same as the iPhone-file but everyting could be disarranged |
OlderNewer