简体   繁体   English

更改超级视图框架不应影响其子视图框架

[英]changing superview frame should not effect its subviews frame

there 那里

I have a viewController ,the hierarchy is something like this 我有一个viewController ,层次结构是这样的

UIView->imageview->uiview->uiimageView->uitableview.

Now i want to change height of only first two object of my hierarchy ie UIView and UIImageView without effecting frames of other subviews .Please help me. 现在我只想更改层次结构的前两个对象的高度,即UIViewUIImageView而不影响其他subviews框架。请帮助我。

According to your original question, this will work for you. 根据您最初的问题,这将为您工作。

self.view.autoResizeSubviews = NO;
self.myImageView.autoResizeSubviews = NO;

and then resize. 然后调整大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么更改UIScrollView的框架会更改其子视图的框架? - Why does changing the frame of a UIScrollView change the frames of its subviews? 在iPhone编程中,子视图应更改其自身的框架和中心,还是超级视图应更改其框架和中心? - In iPhone programming, should a subview change its own frame and center or should a superview change them? 如何根据子视图调整UIViews框架 - How adjust a UIViews frame based on its subviews 从其superView中移除UIView并将其框架扩展到全屏 - Removing a UIView from its superView and expanding its frame to full screen iOS-是否应该更改UIImageView的框架以调整其图像大小? - iOS - Should changing the frame of a UIImageView resize its image? 隐藏超级视图而不隐藏其子视图 - Hiding a superview without hiding its subviews 矿石更改时的subViews框架 - subViews frame when oreiantion changes 如何在超级视图的顶部添加子视图的视图? - How can I add a view from subviews on top of its superview? 从其SuperView中删除视图,通知iPhone上的子视图 - Removing View from its SuperView, Notifying the Subviews on iPhone 以编程方式创建一个视图,框架设置为superview的框架? - create a view programmatically with frame set to superview's frame?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM