zoukankan      html  css  js  c++  java
  • iOS 小技巧总结

    代码版本:

    1  NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"点击注册代表您已经同意我们的《用户协议》"];
    2     NSRange strRange = {14,6};
    3     [str addAttribute:NSForegroundColorAttributeName value:[UIColor colorInSkinWithKey:@"useColor1"] range:strRange];  //设置颜色
    4     [str addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:strRange];
    5 
    6 //因为是   NSMutableAttributedString  所以要使用
    7 
    8 [_radioButton setAttributedTitle:str forState:UIControlStateNormal];

    经常看新手一个一个输入框的收键盘,其实一句话就好了:

    @interface UIView (UITextField)
    - (BOOL)endEditing:(BOOL)force;    // use to make the view or any subview that is the first responder resign (optionally force)
    @end
    [view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; //删除所有子视图
    
  • 相关阅读:
    Tom&Jerry_team——测试总结
    OMCP sprint 第7天
    OMCP sprint 第6天
    OMCP sprint 第5天
    OMCP sprint 第4天
    OMCP sprint 第3天
    OMCP sprint 第2天
    SQL SERVER 如何恢复bak备份文件
    Ext JS
    Linnx环境下常用命令
  • 原文地址:https://www.cnblogs.com/wudemingiOS/p/4768140.html
Copyright © 2011-2022 走看看