On a project I'm working on collaboratively, I've seen that my coworker has used the following code to access/modify non-public properties of UISearchBar
:
something = [self.searchBar valueForKey:@"_searchField"];
[searchField setValue:grayColor forKeyPath:@"_placeholderLabel.textColor"];
...
I'm not sure if this is considered using private API by Apple. Would these cause App Store rejection? I've seen some questions regarding private API usage, but couldn't find any answer to this exact question.