You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The floorf() call causes the view to slowly drift away from where it should be if you resize the superview over and over. Removing the floorf() call solves the problem for me.
I think the best solution would be to rework the autoresizing logic in UIView.m to always base the autoresized frame (& bounds?) on an internal "original frame" CGRect rather than self.frame. That original frame would be set to the last frame set by an outside caller (i.e, not the autoresizing logic) by a call to -setFrame:, and the autoresizing logic would pretend the superview resized from the original frame to the new frame in one step. This would prevent the rounding error from accumulating, and fix the 'drifting' problem @silvermana and I noticed.
I tried hacking up that solution but couldn't get it to work. :( Maybe someone else wants to take a stab at it?
In the meantime, removing the floorf function from that line, as @silvermana suggested, fixed the immediate problem so I'm going to go with that for the time being.
The floorf() call causes the view to slowly drift away from where it should be if you resize the superview over and over. Removing the floorf() call solves the problem for me.
The text was updated successfully, but these errors were encountered: