无夜之星辰
无夜之星辰

Reputation: 6178

For iOS develop,the debug view hierarchy didn't work

when I click the debug view hierarchy in Xcode, it shows nothing and the console alert:

Assertion failure in -[UITextView _firstBaselineOffsetFromTop], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.60.12/UITextView.m:1683

what confused me is that all my project just this viewController occur it.

It's my first time meeting this, could anyone give me some advice.

Upvotes: 1

Views: 365

Answers (1)

yume
yume

Reputation: 36

From Assertion failure in UITextView _firstBaselineOffsetFromTop

Write below in your project.

For obj-C

@interface UITextView(MYTextView)

@end

@implementation UITextView (MYTextView)
- (void)_firstBaselineOffsetFromTop {

}

- (void)_baselineOffsetFromBottom {

}
@end

For swift

extension UITextView {
    func _firstBaselineOffsetFromTop() {
    }
    func _baselineOffsetFromBottom() {
    }
}

Upvotes: 2

Related Questions