[英]Change profile picture button in ios
I want to create change profile picture button like the image below. 我要创建更改个人资料图片按钮,如下图所示。 I'm a newbie in ios, I have an idea of create a view with those button and make the background opacity to 50. I'm just wondering if xcode or ios has a default function same as the shown image below.
我是ios的新手,我有一个用这些按钮创建视图并使背景不透明度达到50的想法。我只是想知道xcode或ios的默认功能是否与下图所示相同。
Use this code: 使用此代码:
UIActionSheet *action=[[UIActionSheet alloc]initWithTitle:@"Change Profile Picture" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Remove Current Photo" otherButtonTitles:@"Import From Facebook",@"Import From Twitter",@"Take Photo",@"Choose From Library", nil];
[action showInView:self.view];
And use below code for actionsheet button click action. 并将以下代码用于操作表按钮单击操作。
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex==0)
{
}
else if (buttonIndex==1)
{
}
...
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.