I would like to change the title of the cancel button of the UISearchBar
using MonoTouch.
Yes I have seen this "hack" but I prefer a more elegant way. I am trying to use:
UIButton.AppearanceWhenContainedIn(typeof(UISearchBar)).SetTitle("xxxx");
which it is supposed to work in objective-c but in MonoTouch I get the following error
message: Error CS1061: Type
MonoTouch.UIKit.UIButton.UIButtonAppearance' does not contain a definition for
SetTitle' and no extension methodSetTitle' of type
MonoTouch.UIKit.UIButton.UIButtonAppearance' could be found (are you missing a using directive or an assembly reference?)
I am using Xamarin Studio ver. 4.0