开发者

Problem of starting and stopping the activity indicator

开发者 https://www.devze.com 2023-02-18 20:30 出处:网络
What I am doing right now I am making an application which is uploading the image on the server...it\'s kind a application where image are shown in the row with send button..and when we press send开发

What I am doing right now

I am making an application which is uploading the image on the server...it's kind a application where image are shown in the row with send button..and when we press send开发者_开发知识库 button..it should be uploaded on the server..

What I want...

here I want to use the Activity Indicator..

Now I want that when I press the send button i want to show the indicator..and when the image is uploaded the indicator should be removed

My Problem...

I dont know where should i put [spinner startAnimating]; and [spinner startAnimating]; methods..I can't put it in the viewDidload because I don't want it to be shown when application starts..I only want to show the indicator only and only I press the send button. and I want activity should be stopped when the uploading is finished..

any suggestion??


Try this.

- (void)sendButtonPressed {
 [spinner startAnimating];
//code to download
}

- (void)finsihedImageDownload {
[spinner stopAnimating];
}
0

精彩评论

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