设置UIActivityIndicatorView的框架
我的活动指示器有问题... 如果我设置了指示器的框架,则显示 UIActivity 指示器后面的黑色背景。如果我没有设置框架,它看起来很好,但位置不正确。现在我如何将指示器设置到正确的位置?
I have problem with Activity Indicator…
if i am set the frame of Indicator is show the black background behind UIActivity indicator. and if i not set frame its look well but not in proper position. now how can i set Indicator to proper position?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(2)
深海夜未眠2024-12-16 04:31:39
添加到@Raj 答案。
您可以使用绑定属性,而不是计算“w”并将其传递到 CGPointMake 中。
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
[indicator startAnimating];
indicator.center = CGPointMake(CGRectGetMidX(yourView.bounds), CGRectGetMidY(yourView.bounds));
[yourView addSubview:indicator];
~没有更多了~
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
它与这段代码配合得很好。
Its work well with this code..