开发者

How to put a cancel button on the locate me tab?

I am developing a location aware application with five tabs.

In the application I have a tab called "locate me" .Tapping on it shows near by things .

After tapping the locate me it first finds the location then based on the location it fetches near by things from the web service and then parses with the nsxmlparser and then then displays in the uitable view.

It is working fine with this situation .But suppose the location manager takes a longer time then expected and so user wants to cancel the request.

How can I put a cancel button below the indicatorview (to show that iPhone is locating and fething) so that tapping on it stops the location manager also if parsing is going in between also stops .

the button shloud be visible only till the uiindicat开发者_如何学Pythonorview is visible .


You could add a UIButton as a subview of your UIIndicatorView, with the requisite image, target and selector hooked up.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜