I am using SVProgressHUD for loader. When i use setContainerView method the loader is not displaying in centre. Can any one help me out.
Used below code to show Loader
+ (void)showLoadingHUDForView:(UIView *)view {
if (view != nil) {
[SVProgressHUD setRingThickness:3.0];
[SVProgressHUD setContainerView:requiredView];
[SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
[SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeClear];
[SVProgressHUD show];
}
}
The solution is to set the progressHUD's offset from center, like so:
If your requiredView is contained in another view, you will have to take in consideration all the parent views in the hierarchy, because progressHUD offset seems to be relative to the app's window.