Added UIButton
to app
UIButton *playButton = [UIButton buttonWithType:UIButtonTypeCustom];
[playButton addTarget:self action:@selector(play:) forControlEvents:UIControlEventTouchUpInside];
UIImage *image = [UIImage imageNamed:@"play.png"];
[playButton setImage:image forState:UIControlStateNormal];
when i run the application it is crashing and message is UIButtonView unrecognized selector
Did exception breakpoint
Found that it is crashing at
[toolbar setItems:toolbarItems];
I think i m not adding UIButton
properly to toolbar
//Add buttons to the array
NSArray *toolbarItems = [NSArray arrayWithObjects: settingsButton, flexItem, rewind, flexItem, playButton, flexItem, pause, flexItem, modalBarButtonItem, nil];
[toolbar setItems:toolbarItems];
Anyideas to fix this one.
Thanks for help.