Is there any notification when frame or bounds of UIView
changes? Whenever frame of a UIView
changes, I need to calculate and set the frame of its custom subview so that it aspect fits in the superview.
NSView
has the notification NSViewFrameDidChangeNotfication
for the purpose. Why is this not there for UIView
?
There is no notification. You can subclass UIView to override layoutSubviews
, to either do the layout directly or send the necessary notification.
Have you tried setting an appropriate autoresizingMask
so the subview gets resized automatically?
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