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

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

问题描述

我希望使用带有演示文稿类型Form Sheet的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。下面是使用现在模态自适应Segue在Swift中应该使用的故事板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天全站免登陆