'2010/07'에 해당되는 글 3건



바닐라루시의 보컬 배다해
- 오페라의 유령 - Think of me (Christine) 이라고 함 ㅋ

너무 아름 다운 목소리.. 제대로 꽂혀버렸음 T^T

Creative Commons License
Creative Commons License
Posted by 지오아빠^^

iPad & Bluetooth Keyboard

APPLE 2010/07/07 19:54


iPad에 Bluetooth 키보드를 연결해봤습니다.
아이패드 세팅에서 블루투스 ON해주면 사용가능한 장치를 자동으로 검색합니다.
검색 결과에 불루투스 키보드를 선택하면 키보드로 키값을 입력하고 엔터키를 입력하라고 합니다.
시키는 대로 해주면 설정 끝!
iOS4가 설치된 아이폰도 지원한다고 합니다.

인증!!

사용자 삽입 이미지
Creative Commons License
Creative Commons License
Posted by 지오아빠^^

iOS 3.1.3 까지는 동영상 재생을 원할때 MPMoviePlayerController를 사용했었습니다.
iOS 3.2 이상 버전에서는 MPMoviePlayerViewController가 추가되었습니다.

아래와 같이 사용하면 3.1.3 이전 버전과 3.2 이상 버전에서 모두 동작하도록 할 수 있습니다.
제 경우에는 UIViewController에 아래 코드를 추가하고 동영상 재생을 원하는 곳에서 노티피케이션으로 알려서 재생을 하는 방식으로 처리했습니다.


- (void) moviePlayBack:(NSNotification *)noti {

NSURL *movieURL = (NSURL *)[[noti userInfo] objectForKey:@"url"];

if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 3.2) {

MPMoviePlayerViewController *playerView = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];

playerView.view.backgroundColor = [UIColor blackColor];

playerView.moviePlayer.scalingMode = MPMovieScalingModeAspectFit;

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:playerView.moviePlayer];

[self presentMoviePlayerViewControllerAnimated:playerView];

[playerView release];

} else if ([[[UIDevice currentDevice] systemVersion] doubleValue] < 3.2) {

MPMoviePlayerController* moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];

moviePlayer.scalingMode = MPMovieScalingModeAspectFit;

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];

[moviePlayer play];

}

}


- (void) playbackDidFinish:(NSNotification *)noti {

if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 3.2) {

    MPMoviePlayerController *player = [noti object];

    [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:player];

    [player stop];

    [self dismissMoviePlayerViewControllerAnimated];

} else if ([[[UIDevice currentDevice] systemVersion] doubleValue] < 3.2) {

    MPMoviePlayerController *player = [noti object];

    [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:player];

    [player stop];

    [player release];

        }

}

Creative Commons License
Creative Commons License
Posted by 지오아빠^^