开发者

iPhone UIActionSheet with UISwitch and UITextField

开发者 https://www.devze.com 2023-01-14 20:56 出处:网络
I\'m just l开发者_运维问答ooking for advice with this as I have no idea where to start but I think a UIActionSheet is probably best.

I'm just l开发者_运维问答ooking 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.

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 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:

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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消