madjid / MMPickerView

An easy to use and customizable PickerView for your iOS app.
MIT License
237 stars 59 forks source link

cancel button #27

Open cloudjanak opened 8 years ago

vinodgithub commented 8 years ago

yes cancel button is required but how to add

joindn commented 8 years ago

when u selected ,the lable text has been changed,no need to add a cannel button ,and if u must add:

_pickerViewBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismiss)];
_pickerViewBarButtonIteml = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(dismiss)];
_pickerViewToolBar.items = @[_pickerViewBarButtonIteml,flexibleSpace, _pickerViewBarButtonItem];