Search code examples
iphoneiossharekituiappearance

Changing bar button appearance causes crash


I am customizing MFMailComposeViewController. For changing it's UI I detected the UIBarButtonItem and changing it's appearance using:

[[UIBarButtonItem appearance]setTitle:@""];

I am getting crashed in my other classes where I used UIBarButtonItem with text. I fixed those by using customView for the bar button. I am also using share kit in my app and now I am having crash in twitter login screen when keyboard appears with toolbar (In next/Previous and Done buttons).

  1. Is there any way to avoid crashes in my app's other bar button items after I set appearance for a specific class?
  2. Is there any way to assign customView to ShareKit's twitter's login screen's buttons?
  3. Is there any way to remove those bar buttons if no for both above?

Thanks.

If this can customize can we?


Solution

  • UIBarButtonItem appearance proxy does not have a method for setTitle.

    In the documentation you will find wich method are available for Customizing Appearance