私の考えは、whatsapp のように半透明のビューを作成することです。
1) 画像ビューにタップ ジェスチャがあります。
2)画像ビューをタップすると、whatsappのような透明なビューの1つのレイヤーが表示されます
3) 次に、3 つのボタンがあります。新規作成、既存の選択、またはキャンセルです。
ここからどのように続行しますか?キャンセルを押すと、半透明のUIビューが飛び出すはずです..
私の考えは、whatsapp のように半透明のビューを作成することです。
1) 画像ビューにタップ ジェスチャがあります。
2)画像ビューをタップすると、whatsappのような透明なビューの1つのレイヤーが表示されます
3) 次に、3 つのボタンがあります。新規作成、既存の選択、またはキャンセルです。
ここからどのように続行しますか?キャンセルを押すと、半透明のUIビューが飛び出すはずです..
UIActionSheetを使用しないのはなぜですか....次のようなものを試してください...
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Take photo",@"Choose existing", nil];
actionSheet.actionSheetStyle=UIActionSheetStyleBlackTranslucent;
[actionSheet showFromRect:[sender frame] inView:self.view animated:YES];
また、デリゲート メソッドでアクションを実装します.....
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
// create an image picker controller
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self;
if(buttonIndex==0)
{
//create image picker with source camera blah blah
}
else if(buttonIndex==1)
{
//choose existing...
}
}
あなたは>>のようなものを得るでしょう