这是一个很奇怪的行为,我不知道哪里出了问题。在iOS7中,下面的代码按预期工作,但在iOS8中,它有一个奇怪的行为。UIView*mainPopupView=[[UIViewalloc]initWithFrame:CGRectMake(10,([UIScreenmainScreen].bounds.size.height-300)/2-50+20,300,380)];mainPopupView.backgroundColor=[UIColorwhiteColor];[self.viewaddSubview:mainPopupView];在iOS7中,这些代码向当前ViewControl