I have created an UISearchBar and I have to insert a view in inputAccessoryView but the compiler gives me this error :
Assignment to readonly property
why this happens ? :
@property(nonatomic,retain)IBOutlet UISearchBar *searchbar;
@property (retain, nonatomic) IBOutlet UIView *keyView;
self.searchbar.inputAccessoryView = keyView;
SearchBars have a UITextView inside, you could look for it in a slightly dirty way and set the inputAccessoryView to it. I’m not sure if this will work, but it’s worth a shot