[英]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.