
-(voID)vIEwWillAppear:(BOol)animated{[super vIEwWillAppear:animated];//self.vIEw.frame = CGRectInset(self.vIEw.frame,100,50);self.vIEw.frame = CGRectMake(50,50,50);} 但仍然,它在屏幕上完全呈现为任何标准视图控制器(0,宽度,高度)
怎么解决?
解决方法 你有方法willLayoutSubvIEws:或vIEwDIDLayoutSubvIEwsCalled to notify the vIEw controller that its vIEw is about to layout
its subvIEws.When a vIEw’s bounds change,the vIEw adjusts the position of its subvIEws.
因此,不会在视图中显示,而是覆盖了willLayoutSubvIEws:
-(voID)vIEwWillLayoutSubvIEws{ [super vIEwWillLayoutSubvIEws]; [self.vIEw setFrame:CGRectMake(100,100)];} 总结 以上是内存溢出为你收集整理的ios – 改变uiviewcontroller视图框架?全部内容,希望文章能够帮你解决ios – 改变uiviewcontroller视图框架?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)