I have got a main view and a view1 into main view, how to resize view1?
This code doesn't work:
self.View1.bounds.size.height = self.view.bounds.size.height;
CGRect frame = self.View1.frame;
frame.size.height = self.view.bounds.size.height;
self.View1.frame = frame;
You can't modify the bounds directly. The CGRect needs to be modified outside of the view's bounds.
CGRect viewBounds = self.view1.bounds;
viewBounds.size.height = self.view.bounds.size.height;
self.view1.bounds = viewBounds;
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With