[英]iPhone - How can I add the NSStepper control to Interface Builder?
I have searched for over 4 hours on the net, but every answer I view seems to assume that the user knows how to add controls to Interface Builder. 我已经在网上搜索了4个多小时,但是我看到的每个答案似乎都假设用户知道如何向Interface Builder添加控件。
How does one add extra controls to IB? 如何为IB添加额外的控件? (Please assume that I know nothing - which is not too far from the mark!)
(请假设我一无所知-距离商标不太远!)
From my research to date, it seems that extra controls have to be programmed, but I cannot believe that we all have to re-invent the wheel! 从我的研究至今,似乎必须对额外的控件进行编程,但是我不相信我们所有人都必须重新发明轮子! Surely it's possible to download a set of controls?
当然可以下载一组控件吗?
Thanks. 谢谢。
Interface Builder comes with a wide variety of controls that are accessible from the Library window (Tools ▸ Library, or ⇧⌘L) under the Objects tab. Interface Builder带有多种控件,可从“对象”选项卡下的“库”窗口(工具▸库或⇧⌘L)访问这些控件。 If you type NSStepper in the search field at the bottom, it should filter out only the stepper controls.
如果在底部的搜索字段中键入NSStepper,则它应仅过滤出步进器控件。 (You're correct, you shouldn't have to re-invent the wheel for basic controls.)
(您是正确的,您不必为基本控件重新发明轮子。)
However, while "NSStepper" produces 2 results when editing a Mac NIB/XIB file in Interface builder, when the open IB document is for iPhone, I get no search results for "NSStepper", even for "step". 但是,尽管在“界面”构建器中编辑Mac NIB / XIB文件时“ NSStepper”产生2个结果,但是当打开的IB文档用于iPhone时,即使“ step”也没有 “ NSStepper”的搜索结果。 It's possible that NSStepper (or an equivalent stepper for Cocoa Touch) doesn't exist for iPhone.
对于iPhone,NSStepper(或Cocoa Touch的等效步进器)可能不存在。 I'm not an iPhone programmer, but my guess is that a logical alternative would be a UISlider or UIPickerView .
我不是iPhone程序员,但我猜想,一个合理的选择是UISlider或UIPickerView 。 (These are links to Apple's docs. Google either class name for find suitable tutorials — I know howtomakeiphoneapps.com has some examples.)
(这些是指向Apple文档的链接。Google可以使用任一类的名称来找到合适的教程-我知道howtomakeiphoneapps.com包含一些示例。)
刚刚发生在这个老问题上...现在有一个适用于iOS 5的步进控件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.