gpt4 book ai didi

ios - iPhone 上的 Swift 表单

转载 作者:可可西里 更新时间:2023-10-31 23:59:16 31 4
gpt4 key购买 nike

我想在 iPhone 上显示一个简单的表单。

像这样的东西 http://static.squarespace.com/static/53449ac2e4b0233041dcf674/t/53937548e4b0c79f2b9b6fb7/1402172750607/TableView.gif?format=500w

虽然我不想使用容器 View ,它不应该那么复杂它只是一个在屏幕中间的透明背景的弹出屏幕

然而,即使我执行了这些步骤:

enter image description here

enter image description here

enter image description here

performSegueWithIdentifier("formSheet", sender: self)

表单 View Controller 仍然像模态视图 Controller 一样全屏显示。

如何解决这个问题?

最佳答案

根据文档,

The presentation style determines how a modally presented view controller is displayed on the screen. On iPhone and iPod touch devices, modal view controllers are always presented full-screen, but on iPad devices there are several different presentation options. For a list of possible presentation styles, and their compatibility with the available transition styles, see the “UIModalPresentationStyle” constant descriptions.

因此,您将无法在 iPhone 上显示表单,除非您使用某些第三方库来实现相同的效果。这是一个这样的图书馆:MZFormSheetController .

参见 UIViewController Class Reference获取更多信息。

关于ios - iPhone 上的 Swift 表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31389683/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com