1. chakri_123's Avatar
    Hi frends,

    I am getting problem with UIActivityIndicatorView( spinner).

    actually my requirement is when ever i click the button the spinner has to appear on the screen,

    here i am using "syn request", it takes few seconds time. that's why i am using spinner there.

    but here the spinner is appearing after the response. [it means after few seconds the spinner is appearing]

    can any one help me plz ....

    for your reference i added my code snippet.


    myViewController.h
    --------------------------
    @interface myViewController : UIViewController {

    IBOutlet UIActivityIndicatorView *spinner;

    }

    @property(nonatomic, retain) IBOutlet UIActivityIndicatorView *spinner;

    myViewController.m

    @synthesize spinner;

    @implementation myViewController

    - (IBAction)buttonClickedid)sender
    {
    [spinner startAnimating];

    - - - - - - - - -
    - - - - - - - - -
    - - - - - - - - -
    - - - - - - - - -
    NSError *error;
    NSURLResponse *response = nil;
    NSData *urlData=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];

    - - - - - - - - -
    - - - - - - - - -
    - - - - - - - - -
    - - - - - - - - -

    [spinner startAnimating];

    }
    02-08-2010 01:11 AM
LINK TO POST COPIED TO CLIPBOARD