kevin-lyn / STPopup

STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.
MIT License
2.6k stars 345 forks source link

UIVisualEffectView 0x149a68280> is being asked to animate its opacity. #81

Closed multinerd closed 7 years ago

multinerd commented 7 years ago

everywhere i use this framework in my code, i get the debugger message <UIVisualEffectView 0x149a68280> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1.

code used

RTGDatesTVC *cal = [[UIStoryboard storyboardWithName:@"RTGSales"
                                              bundle:nil] instantiateViewControllerWithIdentifier:@"RTGDatesTVC"];
cal.dateDelegate = self;
cal.contentSizeInPopup = CGSizeMake((MNScreen_Size).width, 400);
cal.landscapeContentSizeInPopup = CGSizeMake((MNScreen_Size).width, 200);
cal.title = @"Pick a date";
cal.listOfDates = listOfDateRanges;

STPopupController *popupController = [[STPopupController alloc] initWithRootViewController:cal];
if (NSClassFromString(@"UIBlurEffect")) {
    popupController.backgroundView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
}
popupController.style = STPopupStyleBottomSheet;
[popupController presentInViewController:self];
kevin-lyn commented 7 years ago

@multinerd it's because UIVisualEffectView is used as the background view. The visual effect will be sort of not working when STPopup is animating the background view, but everything will be fine after the animation is finished. It won't actually affect the UI though.

multinerd commented 7 years ago

ok, thanks for clarifying