Access to private property (starting with underscore) using KVC viewed using private API?

In a project that I am working on together, I saw that my colleague used the following code to access / change non-public properties UISearchBar:

something = [self.searchBar valueForKey:@"_searchField"];
[searchField setValue:grayColor forKeyPath:@"_placeholderLabel.textColor"];
...

I'm not sure Apple uses a private API. Will this lead to the failure of the App Store? I saw some questions regarding the use of a private API, but could not find the answer to this exact question.

+4
source share
1 answer

Ive , , . iOS, - .

"Would these cause App Store rejection?", , .

+3

Source: https://habr.com/ru/post/1568418/


All Articles