2

I am currently trying my best to debug my application in Objective-C with the newest version of Xcode7.3 I really need to use Debug View Hierarchy but I am getting an error :

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

If someone knows how to resolve this ! Thx

CinCout
  • 9,486
  • 12
  • 49
  • 67
Steven Martreux
  • 277
  • 2
  • 7
  • 1
    Similar question with Swift and Objective-C workarounds [here](http://stackoverflow.com/q/37068231/3681880). – Suragch May 12 '16 at 23:20

3 Answers3

3

This is a bug from Apple. There is a radar issue open : https://openradar.appspot.com/25311044

Quentin C
  • 58
  • 1
  • 5
2

A workaround to resolve this issue. Strictly in debug mode.

@interface UITextView(MYTextView)
@end

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

@end

For swift

extension UITextView {
    func _firstBaselineOffsetFromTop() {}
    func _baselineOffsetFromBottom() {}
}
Rajesh
  • 10,318
  • 16
  • 44
  • 64
0

You can implement the method

- (void)_firstBaselineOffsetFromTop {}

in a UITextView category

Lyric Don
  • 1
  • 1