本文介绍了将视图添加到操作表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以将自定义UIViewController添加到ActionSheet中吗?

Can I add my custom UIViewController into the ActionSheet ?

谢谢

推荐答案

最后我发现它...我已经在UIActionSheet中添加了一个UIViewController的子类视图。我在单独的文件中创建了一个视图(使用xib)。

finally I've find it... I've added a view which is subclass of UIViewController into the UIActionSheet. I've created a view in separate file (using xib) .

UIActionSheet *asheet = [[UIActionSheet alloc] init];
[asheet showInView:self.view];
[asheet setFrame:CGRectMake(0, 230, 320, 230)];


CustomView *innerView = [[CustomView alloc] initWithNibName:@"CustomView" bundle:nil];
innerView.view.frame = CGRectMake(0, 10, 320, 210);
[asheet addSubview:innerView.view];
//[asheet addSubview:innerView];

[innerView release];
[asheet release];

这篇关于将视图添加到操作表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 03:46