Pug*_*gal 7 iphone button activity-indicator ios
我是iPhone开发的新手.我想设置一个活动指示器,它载在我的自定义按钮上.请指导我.(示例:App store - > Search - > Show 25 more(点击)).
phe*_*cks 15
添加UIActivityIndicatorView按钮的子视图:
// Create spinner
UIActivityIndicatorView *myIndicator = [[UIActivityIndicatorView alloc]
initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
// Position the spinner
[myIndicator setCenter:CGPointMake(myButton.frame.size.width / 2, myButton.frame.size.height / 2)];
// Add to button
[myButton addSubview:myIndicator];
// Start the animation
[myIndicator startAnimating];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5698 次 |
| 最近记录: |