PresentModalViewController breaks UITextView layout when fired

I have a very strange problem when using presentModalViewController. I have an application with many UIViewController that display UIButton and UITextViews. I manually shift the text in the UITextViews to align them above or below depending on some criteria.

Everything works fine, except when I use presentModalViewController to display the MFMessageComposeViewController. When I fire the MFMessageComposeViewController, the UITextViews that are behind have lost the offset, and the alignment of the text at the bottom is at the top of the UITextView ...

If I save 99% of the code and just don't call presentModalViewController, everything works. I looked in viewWillAppear, layoutSubviews, etc., to try and find where my offset was reset, but I was stuck.

+4
source share

Source: https://habr.com/ru/post/1446447/


All Articles