Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think I found my solution, I can draw time to another color</p> <pre><code>for (UIView *view in datePicker.subviews) { for (UIView *subView in view.subviews) { for (UIView *subSubView in subView.subviews) { for (UIView *thirdSubView in subSubView.subviews) { for (UILabel *label in thirdSubView.subviews) { if ([label isKindOfClass:[UILabel class]]) { label.textColor = [UIColor redColor]; } } } } } } </code></pre> <p><img src="https://i.stack.imgur.com/be6mm.png" alt="enter image description here"></p> <p>I need to catch event when scrolling DatePicker, I doing this, and this work, but I break the scroll</p> <pre><code>for (UIView *view in datePicker.subviews) { for (UIView *subView in view.subviews) { Class UIPickerTableView = objc_getClass("UIPickerTableView"); if ([subView isKindOfClass:UIPickerTableView]) { UITableView *sub = (UITableView *) subView; sub.delegate = self; } for (UIView *subSubView in subView.subviews) { </code></pre> <p><img src="https://i.stack.imgur.com/aOet2.png" alt="enter image description here"></p> <p>I try doing another way, but it doesn't work</p> <pre><code>for (UIView *view in datePicker.subviews) { for (UIView *subView in view.subviews) { Class UIPickerTableView = objc_getClass("UIPickerTableView"); Method targetMethod = class_getInstanceMethod(UIPickerTableView, @selector(scrollViewDidScroll:)); Method newMethod = class_getInstanceMethod(UIPickerTableView, @selector(__scrollViewDidScroll:)); method_exchangeImplementations(targetMethod, newMethod); for (UIView *subSubView in subView.subviews) { </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload