作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在阅读 apple 开发者库,并想使用像 apple 在图片中显示的子菜单:
第一个问题:那是模态视图吗?如果是,如何创建类似的东西?这个子菜单是否有自己的 Controller 和 View ,或者是在上面的 View 中声明的所有内容?我正在使用 Storyboard。
最佳答案
不,这是一个 UIActionSheet
,它没有 nib 文件或类文件,你可以这样使用它
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Title"
delegate:self
cancelButtonTitle:@"cancel"
destructiveButtonTitle:nil
otherButtonTitles: nil];
[sheet showInView:self.view];
//Function gets called when user taps on a button
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
}
关于ios - XCode/ Storyboard :Creating a Modal View,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11274116/
我是一名优秀的程序员,十分优秀!