Closed soner-yuksel closed 9 years ago
If you need to customize the action sheet picker, then how about adding color, font properties in IQActionSheetPicker. So the initializarion method remains short and simple and developer can the use properties to change the appearance after initialization. Could you do this on behalf of me and send me a pull request?
Sure I will do it, however getting frame of bar button item in order to calculate the width of the title bar button is tricky. Btw in your example code titling doesnt work at all. I will also correct it.
Cheers
Sure, and thanks for your contribution, make sure you have latest code before starting changes. I've done some major changes 2-3 weeks ago to support iOS8.
It would be awesome if you could add this!
I just created a pull request for this,check it later:)
Pull request merged!
Thanks for the great project do we have any option to changedone and cancel button text I could not found how to change ?
Of course you can,In IQActionSheetPickerView.m:
// Create a cancel button to show on keyboard to resign it. Adding a selector to resign it.
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(pickerCancelClicked:)];
[items addObject:cancelButton];
// Create a done button to show on keyboard to resign it. Adding a selector to resign it.
UIBarButtonItem *doneButton =[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(pickerDoneClicked:)];
[items addObject:doneButton];
Just use the style you want
I mean can I change the button title done and cancel . Can I write finish instead of done
Sure,remove the done buttonItem first:
// Create a done button to show on keyboard to resign it. Adding a selector to resign it.
UIBarButtonItem *doneButton =[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(pickerDoneClicked:)];
[items addObject:doneButton];
Then create a new UIBarButtonItem via:
// Create a finish button to show on keyboard to resign it. Adding a selector to resign it.
UIBarButtonItem *finishButton = [[UIBarButtonItem alloc] initWithTitle:@"Finish" style:UIBarButtonItemStylePlain target:self action:@selector(pickerDoneClicked:)];
[items addObject:finishButton];
Currently we can just modify title by hardcoding,you can create a pull request to add this feature:)
First of all thanks for easy to use awesome control.
However I really need an initialization method or a way to customize titles and colors of bar button items cancel and done. So I can use it in my localized application.
Something like this maybe ?