added method for creating bar button items from code. updated example (had to rearrange tabbar and navigation controllers, because a tab bar may contain a navigation but not the other way around (apple guidelines))