views:

33

answers:

1

Hi all ,

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 uiindicatorview is visible .

+1  A: 

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

Alex Reynolds