UIProgressView:如何获取旧样式?

发布于 2024-07-25 20:58:46 字数 515 浏览 8 评论 0原文

我正在寻找 UIProgressView 的旧样式:

替代文本 http://img.skitch。 com/20090620-dagnbt6eh2s884nfkbkqgne1re.jpg

我能够呈现的唯一 UIProgressViewStyle 是这样的:

替代文本 http://img.skitch.com/20090620-ewujnw3r62qnb91qpbdh8iktne.jpg

旧的还可用吗? 设置属性 UIProgressViewStyle 始终会导致蓝色的 UIProgressView。

I'm searching for the old style of the UIProgressView:

alt text http://img.skitch.com/20090620-dagnbt6eh2s884nfkbkqgne1re.jpg

The only UIProgressViewStyle, I'm able to present is this:

alt text http://img.skitch.com/20090620-ewujnw3r62qnb91qpbdh8iktne.jpg

Is the old one still available? Setting the property UIProgressViewStyle always leads to the blue UIProgressView.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

通知家属抬走 2024-08-01 20:58:46

无论如何,访问旧式进度条的另一种方法是以通常的方式创建 UIProgressView 控件。 从 iOS 4.1 开始,您可以通过将进度视图的样式设置为未记录的值 100 来获得旧的外观。

这可以避免使用未记录的类,甚至调用未记录的方法。 然而,我确信苹果仍然不会批准.. ;-)

Dave

For what it'a worth, another way of accessing the old-style progress bar is to create a UIProgressView control in the usual way. As of iOS 4.1, you can get the old appearance by setting the progress view's style to the undocumented value of 100.

This avoids using an undocumented class, or even calling undocumented methods. However, I'm sure Apple still won't approve.. ;-)

Dave

飘然心甜 2024-08-01 20:58:46

我认为 UIProgressView 有两种样式。 默认值被引用为 UIProgressViewStyleDefault,而您所引用的默认值称为 UIProgressViewStyleBar。

这些设置如下
yourUIProgressView.ProgressViewStyle = UIProgressViewStyleBar;

或者

不设置任何默认值。

I think there are two styles for the UIProgressView. The default which is referenced as UIProgressViewStyleDefault, and the one you are referring to is called UIProgressViewStyleBar.

those are set as the following
yourUIProgressView.ProgressViewStyle = UIProgressViewStyleBar;

or

set nothing for the default.

禾厶谷欠 2024-08-01 20:58:46

她在 SDK 仍处于 NDA 状态、使用 IB 之前就写了这本书。 在那之后发生了很多很多的变化。

She wrote her book when the SDK was still NDA and before it used IB. Many, many changes occurred after that time.

浪漫人生路 2024-08-01 20:58:46

它是UIProgressBar,UIProgressView 的私有子类。

你可以这样使用它,但Apple可能会拒绝你的应用程序:

[[NSClassFromString(@"UIProgressBar") alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 100.0f, 90.0f)];

It's UIProgressBar, a private subclass of UIProgressView.

You can use it in this way, but Apple might reject your app:

[[NSClassFromString(@"UIProgressBar") alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 100.0f, 90.0f)];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文