Reputation: 1011
I have this code:
UIBarButtonItem *backButton = [[UIBarButtonItem alloc]initWithTitle: @"Secciones"
style: UIBarStyleDefault
target:nil
action:nil];
and on the line that says style: UIBarStyleDefault
I get the following warning:
Implicit conversion from enumeration type 'UIBarStyle' to different enumeration type 'UIBarButtonItemStyle'
Upvotes: 1
Views: 2006
Reputation: 25781
You shouldn't be a using UIBarStyle, but a UIBarButtonItemStyles instead (which is, as the name suggests, meant to be used for UIBarButtonItems):
UIBarButtonItem *backButton = [[UIBarButtonItem alloc]
initWithTitle: @"Secciones"
style: UIBarButtonItemStylePlain
target:nil
action:nil
];
Upvotes: 6