Skip to content

Instantly share code, notes, and snippets.

@smoll
smoll / USING-DIFFMERGE.md
Last active October 21, 2023 23:37
Using DiffMerge as your git mergetool (for Mac OS X / macOS)
@bojan
bojan / .gitignore
Last active August 8, 2022 07:43
Git ignore file for development on Apple platforms. Covers Xcode, AppCode, SPM, Carthage, CocoaPods, Fastlane, etc.
# --------------------------------
# macOS temporary files
# --------------------------------
.DS_Store
*.lock
*.swp
# --------------------------------
# Xcode
# --------------------------------
@markSci5
markSci5 / UINavigationController+Autorotation.h
Created July 9, 2013 07:52
Allow navigation controller's view controllers to follow their own orientation rules
@interface UINavigationController (autorotation)
-(BOOL)shouldAutorotate;
-(NSUInteger)supportedInterfaceOrientations;
@end
@markSci5
markSci5 / Storyboard accessing category
Created July 9, 2013 03:21
Storyboard category for accessing different storyboards
@implementation UIStoryboard (MyApp)
+ (UIStoryboard *)mainStoryboard {
return [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
}
@end
@markSci5
markSci5 / UIStoryboard controller instantiation
Created July 9, 2013 03:19
UIStoryboard controller instantiation
// 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];
@markSci5
markSci5 / Balsamiq Useful shortcuts
Created July 4, 2013 05:26
Balsamiq useful shortcuts
/ - 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
@markSci5
markSci5 / Git checkout remote branch
Created July 3, 2013 07:08
Git checkout remote branch
//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
@markSci5
markSci5 / Git stage deleted files
Created July 3, 2013 04:57
Stage all removed files
git add -u
@markSci5
markSci5 / MySingleton.h
Created July 2, 2013 02:50
iOS Singleton
#import <Foundation/Foundation.h>
@interface MySingleton : NSObject
- (id)sharedInstance;
@end