更新时间:2023-01-25 11:48:22
两个问题:
首先,self.view.center是当前视图框架在其父框架上的中心。如果你想要当前视图的中心,你想要 CGPointMake(self.view.frame.size.width / 2.0,self.view.frame.size.height / 2.0);
其次,您当前的视图不包含导航栏,因此您将其置于导航栏下方屏幕的空间中心。这也会让它看起来更低。
Second, your current view does not include the navigationbar, so you're centering it on the space of the screen below the nav bar. That will also make it look lower.