具有UISwitch和UITextField的iPhone UIActionSheet

编程入门 行业动态 更新时间:2024-10-07 18:24:40
本文介绍了具有UISwitch和UITextField的iPhone UIActionSheet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我只是在寻求建议,因为我不知道从哪里开始,但我认为UIActionSheet可能是最好的.

I'm just looking for advice with this as I have no idea where to start but I think a UIActionSheet is probably best.

我想拥有一个弹出窗口(在我的脑海中,我将其想象为半透明和深灰色).它不会占据整个屏幕,并且下面的视图仍然可见.

What I'd like to have is a pop up window (in my head I picture it as being translucent and dark gray). It will not take up the whole screen and the view underneath will still be visible.

在弹出部分中,将有一个文本字段(包含几行),在此字段下方将有许多UISwitches.

In the pop up section there will be a textfield (with several lines) and underneath this there will be a number of UISwitches.

弹出窗口将是可滚动的,并在底部以确定/取消"按钮结束.

The pop up will be scrollable and will end with OK/Cancel buttons at the bottom.

就像我说的那样,我真的不知道从哪里开始,但是任何建议都值得欢迎!

Like I said, I really have no idea where to start with this but any advice is more than welcome!

推荐答案

A UIActionSheet 在这种情况下可能不是您想要的(尽管您可能想要类似的外观).将操作表视为传统的模式OK/Cancel/Yes/No type对话框:

A UIActionSheet is probably not what you are after in this case (although you may want a similar look and feel). Think of an action sheet as a traditional modal OK/cancel/Yes/No type dialog box:

使用UIActionSheet类向用户显示一组如何执行给定任务的替代方法.

Use the UIActionSheet class to present the user with a set of alternatives for how to proceed with a given task.

从声音上讲,您需要在InterfaceBuilder中创建一个具有半透明背景和各种子控件( UISwitches 和 UITextFields ).您可以使用已配置的XIB创建视图,并将其添加为UIViewController视图的子视图.如果要模仿从操作表中获得的动画,可以使用 AnimationBlock .

From the sound it of it, you need to create a UIView in InterfaceBuilder with a semi-transparent background and various child controls (UISwitches and UITextFields). You create your view using the XIB you have configured and add it as a subview of your UIViewController's view. If you want to mimic the animation you get from an action sheet, you can do that with an AnimationBlock.

更多推荐

具有UISwitch和UITextField的iPhone UIActionSheet

本文发布于:2023-11-25 21:02:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1631334.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:UITextField   UISwitch   UIActionSheet   iPhone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!