zoukankan      html  css  js  c++  java
  • DatePicker 设置字体颜色

     

        [self.datePicker setValue:RGBCOLOR(204, 204, 204) forKey:@"textColor"];

     

    // 默认选中的颜色 为黑色 修改方法如下

    //通过NSSelectorFromString获取setHighlightsToday方法

        SEL selector= NSSelectorFromString(@"setHighlightsToday:");

        //创建NSInvocation

        NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[UIDatePicker instanceMethodSignatureForSelector:selector]];

        BOOL no = NO;

        [invocation setSelector:selector];

        //setArgument中第一个参数的类picker,第二个参数是SEL

        [invocation setArgument:&no atIndex:2];

        //invocation执行setHighlightsToday方法

        [invocation invokeWithTarget:self.datePicker];

     

     

  • 相关阅读:
    Ionic移动应用框架
    JavaScript为iphone添加到主屏幕
    移动前端:在手机上隐藏地址工具栏
    Swipe.js支持网页点击和数字导航
    String类的概述和常用方法
    今天的学习
    集合的区别
    面向对象总结
    面向对象的封装
    方法的多态中的重写
  • 原文地址:https://www.cnblogs.com/shifu/p/6232201.html
Copyright © 2011-2022 走看看