Open openradar-mirror opened 8 years ago
A workaround to resolve this issue. Keep below category in your project. It worked for me.
@interface UITextView(MYTextView)
@end
@implementation UITextView (MYTextView)
- (void)_firstBaselineOffsetFromTop {
}
- (void)_baselineOffsetFromBottom {
}
@end
Description
Summary: The visual debugger fails because of an assertion in UIKit's UITextView when auto layout is not used.
Steps to Reproduce: Run sample in Xcode 7.3. Select view debugger. Observe assertion in the log and no working view debugger.
2016-03-23 10:05:17.963 AutoLayoutViewDebuggingIssue[83786:1782898] *\ Assertion failure in -[UITextView _firstBaselineOffsetFromTop], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.60.7/UITextView.m:1683
Expected Results: View debugger should work. Nothing should throw up in the log.
Actual Results: Sadness. No view debugger. Me going back to Reveal, then getting curious and spending an hour on this radar :)
Regression: This used to work, could be a regression in Xcode 7.3 OR in UIKit 9.3? I’ve checked my decompiles for UIKit and it doesn’t seem like it’s a recent UIKit change, so pretty sure it’s a recent Xcode change instead.
Notes: See my workaround in ViewController.m via adding useless constraints to satisfy the check in the method that asserts. Rather not do that but don’t see another way.
Product Version: 9.3 Created: 2016-03-23T09:12:15.266420 Originated: 2016-03-23T10:12:00 Open Radar Link: http://www.openradar.me/25311044