๐
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
typedef NS_ENUM(NSInteger, UITableViewCellStyle) { | |
UITableViewCellStyleDefault, | |
UITableViewCellStyleValue1, | |
UITableViewCellStyleValue2, | |
UITableViewCellStyleSubtitle | |
}; |
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
// Adding A Child View Controller | |
[self addChildViewController:viewController]; | |
viewController.view.frame = self.view.bounds; | |
[self.view addSubview:viewController.view]; | |
[viewController didMoveToParentViewController:self]; | |
// Removing A Child From A Parent | |
[viewController willMoveToParentViewController:nil]; | |
[viewController.view removeFromSuperview]; | |
[viewController removeFromParentViewController]; |
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
Get document directory | |
NSString *documentDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; | |
NSString *filePath = [documentDir stringByAppendingPathComponent:@"file.bin"]; | |
Save | |
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:object]; | |
[NSKeyedArchiver archiveRootObject:data toFile:filePath]; | |
Load | |
NSData *data = [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
Deprecated declarations | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wdeprecated-declarations" | |
NSLog(@"Your code goes here"); | |
#pragma clang diagnostic pop | |
PerformSelector | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Warc-performSelector-leaks" | |
[self.ticketTarget performSelector: self.ticketAction withObject: self]; |
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
// Xcode 6 Beta to use Swift REPL | |
sudo xcode-select -switch /Applications/Xcode6-Beta.app/Contents/Developer | |
xcrun swift | |
lldb --repl | |
// Xcode 5 | |
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer |
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
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl |
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
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)" |
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
Download for Mavericks https://guide.macports.org/chunked/installing.macports.html | |
Edit ~/.zshrc | |
export PATH="/opt/local/bin:/usr/local/bin:$PATH" |
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
sudo easy_install pip |
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
brew install macvim --env-std --override-system-vim | |
brew linkapps | |
Usage | |
mvim |
OlderNewer