How to create Form Sheet popup for iPad (iOS 8.1)

落爺英雄遲暮 提交于 2019-12-07 05:42:30

问题


I want to make very basic popup window by using Swift (8.1) with presentation type "Form Sheet", it should be a window that float at the middle of the screen without tales.

I created two View Controllers, one button and connect the button from one controller to another with parameter "Present As Popover". Second view controller was selected as "Form Sheet", but the result is wrong:

Why?


回答1:


Don't present it as a Popover. You want the segue to be Modal and present it as a form sheet. In the storyboard, click on the segue and change the "Segue" to "Modal"

EDIT

In my haste, I used an Objective-C project for setting up an example instead of Swift. Below is what the Storyboard Segue should be in Swift using the "Present Modally" Adaptive Segue.



来源:https://stackoverflow.com/questions/26701590/how-to-create-form-sheet-popup-for-ipad-ios-8-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!