简体   繁体   中英

iOS 7 - UITextField Clip Subviews Isn't Working

I am porting an iOS 6 application to iOS 7 and have noticed some UI bugs that I have bad some issues solving. The largest would be one I found in the UITextView. In iOS 6 I have a UITextField that has a varying amount of dynamic text in it. I have a function that resizes the table view cell around the text view but I found it hard to accurately predict the size of the UITextView so I just disabled clipping and let the text overflow outside the UITextView. I put a buffer between the cell view and the text and thought the problem was solved. When I ported the application to iOS 7 this no longer worked. I can't seem to find a way to have the UITextView not clip it's subviews and overflow the text as it did in iOS 6. I have tried setting setClipsToBounds:NO both in the UIStoryboard and programatically, and have also tried disabling the layer mask with setMasksToBounds:NO . Nothing seems to work, how can I solve this problem?

Hey so I ended up fixing this issue using the iOS 7 constraints. I clipped the bottom of the UITextView to the outer view and removed the pinned height. This allowed the UITextView to resize appropriately.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM