Not able to use debug view hierachy
Asked Answered
H

3

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

Hydrometeor answered 3/5, 2016 at 4:45 Comment(1)
Similar question with Swift and Objective-C workarounds here.Stirling
S
3

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

Sodden answered 3/5, 2016 at 16:37 Comment(0)
V
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() {}
}
Valorievalorization answered 10/6, 2016 at 7:40 Comment(0)
D
0

You can implement the method

- (void)_firstBaselineOffsetFromTop {}

in a UITextView category

Dariodariole answered 13/5, 2016 at 9:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.