How to show a wait cursor until process is running

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to show a wait cursor until process is running

Madhusudhan
How to show a wait cursor until process is running.

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|

Re: How to show a wait cursor until process is running

Nic Wise
the one up by the name of the carrier is using

 UIApplication.SharedApplication.NetworkActivityIndicatorVisible =
(true or false);

eg

private static int networkActivityCounter = 0;
        public static void TurnOnNetworkActivity()
        {
            if (networkActivityCounter == 0)
            {

UIApplication.SharedApplication.NetworkActivityIndicatorVisible =
true;
            }
            networkActivityCounter ++;
        }

        public static void TurnOffNetworkActivity()
        {
            networkActivityCounter--;

            if (networkActivityCounter <= 0)
            {
                networkActivityCounter = 0;

UIApplication.SharedApplication.NetworkActivityIndicatorVisible =
false;
            }
        }

(so you can call it more than once, and it'll turn off after you turn
it off the right number of times)

If you want something more.... obvious to the user, try this:

https://components.xamarin.com/view/btprogresshud/


On 11 May 2013 07:04, madhusudhan reddy <[hidden email]> wrote:
> How to show a wait cursor until process is running.
>
> _______________________________________________
> MonoTouch mailing list
> [hidden email]
> http://lists.ximian.com/mailman/listinfo/monotouch
>



--
Nic Wise
t.  +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/
_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch