devxoul / UITextView-Placeholder

A missing placeholder for UITextView
MIT License
1.48k stars 259 forks source link

Crash on iOS 15 #85

Closed Itheme closed 2 years ago

Itheme commented 2 years ago

observeValueForKeyPathin the UITextView+Placeholder.m calls [self updatePlaceholderTextView]; which performs bounds change. Then observeValueForKeyPath is called again for the property "bounds" with a change dictionary like this:

{
    kind = 1;
    new = "NSRect: {{..., ...}, {..., ...}}";
}

It creates an infinite loop

Itheme commented 2 years ago

Though it can be mitigated without changing pod's code