srinivas srinivas - 3 months ago 17
iOS Question

How to display activity indicator in middle of the iphone screen?

When we draw the image, we want to display the activity indicator.
Can anyone help us?

Answer
UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc]     
        initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];

    activityView.center=self.view.center;
    [activityView startAnimating];
    [self.view addSubview:activityView];