IanMK2 Blog

UIAlertView와 비슷하다

- (IBAction)captureClicked:(id)sender{
UIActionSheet *ask = [[UIActionSheet alloc] initWithTitle:@"사진" delegate:self cancelButtonTitle:@"취소" destructiveButtonTitle:@"앨범에서 선택" otherButtonTitles:@"찍기",nil];
//other버튼에서 마지막에 nil로 하는거 잊지말자 가끔씩 깜빡하는데 콘솔봐도 에러메세지 안뜨고 삽질하기 쉽다.

ask.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[ask showInView:self.view];
[ask release];
}

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
switch(buttonIndex)
{
case 0:
[self getPhotos];
break;
case 1:
break;

}
}


삽질하지말고 액션시트 델리게이트정도는 추가하자
Posted by IanMK2