UIActionSheet* sheet = [UIActionSheet new];
sheet.delegate = self;
[sheet addButtonWithTitle:@"action1"];
[sheet addButtonWithTitle:@"action2"];
[sheet addButtonWithTitle:@"Cancel"];
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
| xcodebuild test -scheme Tests -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch 64-bit)' |
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
| sips -g pixelWidth -g pixelHeight xxx.png |
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
| http://stackoverflow.com/questions/6203109/loading-nsbundle-files-on-ios |
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)zipArchiveDidUnzipArchiveAtPath:(NSString*)path | |
| zipInfo:(unz_global_info)zipInfo | |
| unzippedPath:(NSString*)unzippedPath | |
| { | |
| NSString* bundlePath = [unzippedPath stringByAppendingPathComponent:@"storyboards.bundle"]; | |
| NSURL* url = [NSURL fileURLWithPath:bundlePath]; | |
| NSBundle* bundle = [NSBundle bundleWithURL:url]; | |
| UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Downloadable" bundle:bundle]; | |
| UIViewController* viewController = [storyboard instantiateInitialViewController]; |
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
| xcodebuild: error: Failed to build project ReplaceImageCategoryForXcode with scheme Tests. | |
| Reason: The scheme 'Tests' is not configured for Running. |
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
| #!/usr/bin/env objc-run | |
| @import Foundation; | |
| //----------------------------------------------------------------------------// | |
| #pragma mark - interface | |
| //----------------------------------------------------------------------------// | |
| @interface Sample : NSObject |
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
| if [ -e *.xcworkspace ]; then | |
| find *.xcworkspace | head -1 | xargs open | |
| elif [ -e *.xcodeproj ]; then | |
| find *.xcodeproj | head -1 | xargs open | |
| fi |
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
| cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks | |
| find . -name "*.h" | xargs egrep -o '[-+]\s+\([^/]*;' | egrep -o '[-+]\s+.*' | sort | uniq > method_defines.txt |
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
| #!/bin/sh | |
| if [ $# -lt 1 ]; then | |
| echo "USAGE: xcode_action [action]" | |
| echo "action:" | |
| echo " build" | |
| echo " run" | |
| echo " clean" | |
| echo " open FileName:row" | |
| exit 1 |