jdg / MBProgressHUD

MBProgressHUD + Customizations
http://www.bukovinski.com/
MIT License
16.01k stars 3.56k forks source link

MBProgressHud activityIndicatorColor stopped working #387

Closed Voley closed 8 years ago

Voley commented 8 years ago

Recently one I found out that in our application MBProgressHUD changed color to white. It is shown on white square, so it is not visible.

We have always used 0.9.2, for like half a year and there were no problems.

Here is the code. Changing actual hud color works, but not the activity indicator color.

What can I do to make it work again?

+ (MBProgressHUD *)showGreenHUDInView:(UIView *)view {
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
    hud.color = [UIColor whiteColor];
    hud.activityIndicatorColor = [UIColor redColor]; // anything here does not take effect
    return hud;
}

After inspecting actual indicator it says that it has no color. if I ask for hud.activityIndicatorColor it says it is red.

I have localized the problem to - (void)updateIndicators function, namely this part:

#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000
        [(UIActivityIndicatorView *)indicator setColor:self.activityIndicatorColor];
#endif

For some reason this macro returns 40300 for my project, but my project requires ios 8.0. Pods deployment target is 8.0 but for some reason MBProgressHUD Deployment target is 4.3 but base SDK is 9.3

So how do I win this if even if I change deployment target to 8.0 it will get overwritten by pods install?

I think this got changed after I upgraded to Cocoapods 1.0. I will create an issue with them.

Voley commented 8 years ago

Reason is in https://github.com/jdg/MBProgressHUD/issues/389 closing.