Hi,
I have created a UIButton by passing an integer value as this.
Code:
UIButton* custom_newBackButton = [UIButton buttonWithType:101];
[custom_newBackButton addTarget:self action:@selector(backButtonAction) forControlEvents:UIControlEventTouchUpInside];
[custom_newBackButton setTitle:@"Back" forState:UIControlStateNormal];
UIBarButtonItem* newBackButton = [[UIBarButtonItem alloc] initWithCustomView:custom_newBackButton];
[[self navigationItem] setLeftBarButtonItem: newBackButton];
In some of the classes this works but some of the classes it fails with "Invalid conversion from int to UIButtonType". Is this a recommended way to handle this. I have simply use this 101 to get the back button look and feel.
Regards,
Dilshan