tags:

views:

1248

answers:

1

Example: If the user takes a call during the use of an app, the System quits the app. But if the user comes back to the app while he is still on the call, then the Status Bar will be heigher than usual. That's to indicate that he's still on a call. However, this results in layout-problems. Like I understand it, the System would then send a Message to the layoutSubviews Method of every UIView object in my layout, right? Will that happen on any layout-change that is invoked by the system?

+1  A: 

This method will not be triggered by basic changes to geometry (see Apple's docs on UIView). You could try setting the view's contentMode to UIViewContentModeRedraw, which will cause the system to call drawRect: on your view for all geometry changes (presumably including when the in-call bar is in place). You may not want to call layoutSubviews all the time from drawRect:, due to the performance hit involved in completely recreating a complex view hierarchy, but you could at least figure out specifically which of the subviews need to be resized/redrawn based on the passed CGRect and modify just those.

Marc W