I want to change the width of the textfield that is inside UISearchBar keeping its appearance.
I've tried to subclass UISearchBar and in drawRect check the self.subviews that is a kind of class UITextField and change its width, but didn't work.
I also tried this inside the layoutSubviews method but keep not working.
My objective is to have a UIButton over the right side of UISearchBar, but when I'm writing text, it can't be overlap by the UIButton.