Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created February 9, 2009 15:08
Show Gist options
  • Save ELLIOTTCABLE/60817 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/60817 to your computer and use it in GitHub Desktop.
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError {
QTDataReference *dataRef = [QTDataReference dataReferenceWithDataRefData:data type:typeName];
QTMovie *aMovie = [QTMovie movieWithDataReference:dataRef error:outError];
if ( outError != NULL ) {
NSLog(@"MyDocument -readFromData: ofType:%@ error:%@]", typeName, *outError);
return NO;
}
[self setMovie:aMovie];
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment