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
#!/bin/sh | |
$@ > /tmp/verbose | |
say `cat /tmp/verbose` |
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
// This gist demonstrates how to play a movie on the iPhone | |
// This code sample assumes you have a file called "Movie.m4v" in your Resources folder, and | |
// have /included the MediaPlayer Framework (/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks/MediaPlayer.framework) | |
#import <MediaPlayer/MediaPlayer.h> | |
... | |
-(IBAction)playMovie:(id)sender{ | |
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
// This sample creates a repeating timer and updates a label on the view each time the timer executes | |
@interface TimerTextViewController : UIViewController { | |
IBOutlet UILabel *label; | |
NSTimer *repeatingTimer; | |
NSUInteger timerCount; | |
} |
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
//This sample loads a text file which is included with your iPhone application and sends the text to | |
// standard error | |
// | |
// This sample assumes you have added a file named "sometext.txt" to your "Resources" folder in your project. | |
-(NSString *)getFileLocation | |
{ | |
NSBundle *bundle = [NSBundle mainBundle]; | |
NSString *filePath = [bundle pathForResource:@"sometext" ofType:@"txt"]; |
NewerOlder