AndrewShmig
AndrewShmig

Reputation: 4923

Why UIActivityIndicatorView is not showing on UIWebView?

Code:

CGPoint centerPoint = [_inner_web_view center];
CGRect frame = CGRectMake(centerPoint.x, centerPoint.y, 100, 100);
_activity_indicator = [[UIActivityIndicatorView alloc]
                       initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
[_activity_indicator setFrame:frame];
[_inner_web_view addSubview:_activity_indicator];

What I need is to display ActivityIndicator on UIWebView. Even after using [_activity_indicator startAnimating] nothing happens. :(

Can someone help me find out WHY this happens?

Upvotes: 0

Views: 329

Answers (1)

saadnib
saadnib

Reputation: 11145

Your Activity Indicator View's Style is White UIActivityIndicatorViewStyleWhite and UIWebView also has white background when loading. Try Gray Style UIActivityIndicatorViewStyleGray.

Upvotes: 2

Related Questions