Skip to content

Instantly share code, notes, and snippets.

@colinta
Created April 27, 2013 21:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colinta/5474897 to your computer and use it in GitHub Desktop.
Save colinta/5474897 to your computer and use it in GitHub Desktop.
Teacup.handler UINavigationBar, :backgroundImage do |styles|
styles.each do |metric, image|
case metric
when UIBarMetricsDefault, :portrait
self.setBackgroundImage(image && image.uiimage, forBarMetrics:UIBarMetricsDefault)
when UIBarMetricsLandscapePhone, :landscape
self.setBackgroundImage(image && image.uiimage, forBarMetrics:UIBarMetricsLandscapePhone)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment