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];

     

     

  • 相关阅读:
    Git的使用
    Flask(五)
    Flask(四)
    Flask(二)
    Flask(一)
    SDL 五子棋游戏
    c++单例模式
    ubuntu安装虚拟机
    git 命令
    汇编x86入门
  • 原文地址:https://www.cnblogs.com/shifu/p/6232201.html
Copyright © 2011-2022 走看看