Last Updated: February 25, 2016
·
1.396K
· gouravtiwari

Background color of Back Button in Rubymotion

In UIViewController:

back_button_background = UIImage.imageNamed("back_btn.jpg").resizableImageWithCapInsets([0, 14, 0, 6])
back_button = UIBarButtonItem.appearance.setBackButtonBackgroundImage(back_button_background, forState: UIControlStateNormal, barMetrics: UIBarMetricsDefault)
self.navigationItem.backBarButtonItem = back_button