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];
}
'iOS' 카테고리의 다른 글
Protocols - Objective-C (0) | 2010.06.27 |
---|---|
xcode 에서 회사 이름 바꾸기 (0) | 2010.01.01 |
아이폰 강좌 (0) | 2009.12.24 |