This code used to work, but after ios 10 it has stopped functioning:
UITextField *searchTextField = [_searchBar valueForKey:@"_searchField"];
searchTextField.textAlignment = NSTextAlignmentRight
I have tried both paragraph and attributedPlaceholder, but the placeholder is always left aligned. The bug appears in xcode 7 and 8. How can I resolve this?