Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can set ActionSheetDatePicker text color? #582

Open
hendrathings opened this issue Sep 26, 2024 · 1 comment
Open

can set ActionSheetDatePicker text color? #582

hendrathings opened this issue Sep 26, 2024 · 1 comment

Comments

@hendrathings
Copy link

hendrathings commented Sep 26, 2024

Screenshot 2024-09-26 at 7 40 41 PM

Here the code

    let picker = ActionSheetDatePicker(
        title: "Jam",
        datePickerMode: UIDatePicker.Mode.time,
        selectedDate: self.selectedTimeDate.date,
        target: self,
        action: #selector(EventFormViewController.timePicked(_:)),
        origin: self.view
    )
    
    picker?.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white]
    picker?.pickerBackgroundColor = UIColor.black
    picker?.toolbarBackgroundColor = UIColor.black
    picker?.setTextColor(UIColor.white)
    picker?.toolbarButtonsColor = UIColor.blue
    
    picker?.show()

is there any chance to change to text color on light theme?

Thanks

@hendrathings
Copy link
Author

hi @skywinder any suggest or solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant