0

我正在展示一个普通的 ViewController。现在我将点击一个按钮,我想看到的只是下图:

我的自定义视图交互

在这张图片中,背景是我的根视图控制器,当我点击按钮时,一个包含黑色(alpha = 0.8)的图像视图将放在顶部并显示我的自定义视图。在我的自定义视图中,当我点击完成按钮时 -> textField1 和 textField2 的内容将发送回 rootViewController 并隐藏我的自定义视图。

那么,你能帮我解决我的情况吗?提前谢谢。

4

2 回答 2

2

您可以使用委托和块编程将数据发送回根视图控制器。

于 2013-11-05T05:14:17.813 回答
0

Its simple, In Interface builder, Add a UIImageView to the view, and a UIView and connect them both to your .h file. Then set the imageView's values and buttons in custom view and And in your viewwillappear method in .m file, set them hidden using [imageView setHidden:YES];

And when you want to show them just set your setHidden to NO and you should be able to see the customView.

于 2013-11-05T05:24:34.583 回答