![](/img/trans.png)
[英]Adding subview to main view in tableViewController adds subview to table view instead of view in swift
[英]Embedding subview in main view Swift
如果您查看此图像 (我不想上传它,因为它不属于我),您将在iPad的设置应用程序的主uiview控制器中看到似乎是uiview的内容。 我的问题是,如何以编程方式复制此内容? 换句话说,如何将UIView嵌入另一个视图中?
这是我所知道并已完成的工作:
这是我需要的:
这是我到目前为止的内容:
@IBAction func buttonPressedSpawnSubview(sender: AnyObject) {
//Open a subview from Interface builder.
}
@IBAction func closeButtonPressedSpawnSubview(sender: AnyObject) {
//kill the subview.
有人可以帮我弄清楚如何填写注释行吗?
您将看到的是另一个视图之上的模式UIView。
您可见的ViewController中的示例为:
self.modalTransitionStyle = UIModalTransitionStyle.FlipHorizontal // Choose whatever transition you want
self.modalPresentationStyle = .CurrentContext // Display on top of current UIView
self.presentViewController(yourNewViewObject, animated: true, completion: nil)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.