Hi,
Can anyone tell me how to achieve such loading message? is it some variation of UIActivityIndicatorView? thanks peter
Hi,
Can anyone tell me how to achieve such loading message? is it some variation of UIActivityIndicatorView? thanks peter
The spinning wheel is definitely a UIActivityIndicatorView. The "Loading..." text is a UILabel, the rectangle could be an image or could be a UIView with rounded corners (via CALayer). Any questions about the rest of the message? T
Something similar to the following in your initWithFrame of your custom subclassed UIView:
_hudView = [[UIView alloc] initWithFrame:CGRectMake(75, 155, 170, 170)];
_hudView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];
_hudView.clipsToBounds = YES;
_hudView.layer.cornerRadius = 10.0;
_activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
_activityIndicatorView.frame = CGRectMake(65, 40, _activityIndicatorView.bounds.size.width, _activityIndicatorView.bounds.size.height);
[_hudView addSubview:_activityIndicatorView];
[_activityIndicatorView startAnimating];
_captionLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 115, 130, 22)];
_captionLabel.backgroundColor = [UIColor clearColor];
_captionLabel.textColor = [UIColor whiteColor];
_captionLabel.adjustsFontSizeToFitWidth = YES;
_captionLabel.textAlignment = UITextAlignmentCenter;
_captionLabel.text = @"Loading...";
[_hudView addSubview:_captionLabel];
[self addSubview:_hudView];