srinivas srinivas - 1 year ago 83
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 Source
UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc]     
        initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];

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