如何为 iPad (iOS 8.1) 创建表单弹出窗口 [英] How to create Form Sheet popup for iPad (iOS 8.1)

查看:69
本文介绍了如何为 iPad (iOS 8.1) 创建表单弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 Swift (8.1) 和演示类型​​表单"制作非常基本的弹出窗口,它应该是一个浮动在屏幕中间没有故事的窗口.

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.

我创建了两个视图控制器,一个按钮,并使用参数Present As Popover"将按钮从一个控制器连接到另一个控制器.第二个视图控制器被选为表单",但结果错误:

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:

为什么?

推荐答案

不要将其呈现为 Popover.您希望 segue 为 Modal 并将其呈现为表单.在情节提要中,点击segue并将Segue"更改为Modal"

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"

匆忙中,我使用了一个 Objective-C 项目来设置示例,而不是 Swift.下面是使用Present Modally"自适应 Segue 在 Swift 中的 Storyboard Segue 应该是什么.

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.

这篇关于如何为 iPad (iOS 8.1) 创建表单弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆