erica 예제 c3-06-Synchronous Downloads
NSURL *url = [NSURL URLWithString: [urlArray objectAtIndex:[which intValue]]];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url];
NSURLResponse *response;
NSError *error;
NSData* result = [NSURLConnection sendSynchronousRequest:
theRequest returningResponse:&response error:&error];덤으로 무비 플레이어
- (void) startPlayback : (id) sender
{
MPMoviePlayerController* theMovie=[[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:self.savePath]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:theMovie];
[theMovie play];
}
댓글 없음:
댓글 쓰기