This is quite a strange behaviour and I couldn't figure what was wrong out. In iOS7, this code below works as expected but in iOS 8, it has a strange behaviour.
UIView *mainPopupView = [[UIView alloc] initWithFrame:CGRectMake(10, ([UIScreen mainScreen].bounds.size.height-300)/2-50+20, 300, 380)];
mainPopupView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:mainPopupView];
In iOS7, these codes add a white mainPopupView to the present view controller, everything is working properly. But in iOS8, after mainPopupView is presented, a black screen (like an UIView with Black blackgroundColor) appears behind mainPopupView. IMO there has some change about the addSubview: method, I tried various searching on Google but no result. Anyone please explains to me why this happens and how to resolve it?
Thanks in advance.