Skip to content

Instantly share code, notes, and snippets.

@problame
Last active January 4, 2016 14:29
Show Gist options
  • Select an option

  • Save problame/8634371 to your computer and use it in GitHub Desktop.

Select an option

Save problame/8634371 to your computer and use it in GitHub Desktop.
Xcode Base Localization Cheat Sheet

#Xcode Base Localization Cheat Sheet

If you are using Base.lproj to localize your Storyboards in Xcode (and you should!), you need to work with specific attributes for the IB objects that are not always equal to the real UIKit objects in code.

  • UILabel.textIBUILabel.text
  • UIButton.titleIBUIButton.normalTitle
  • UINavigationItem.titleIBUINavigationItem.title
  • UITabBarItem.titleIBUITabBarItem.title
  • [UISegmentedControl setTitle:forSegmentAtIndex:]IBUISegmentedControl.segmentTitles[n]
  • Title of a section in a static UITableView → IBUITableViewSection.headerTitle
  • Footer of a section in a static UITableView → IBUITableViewSection.footerTitle

This is a work in progress!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment