• 第31月第25天 xcode debug 限制uitextfiled输入


    1.xcode debug

    了解了每个设置的意思,个人觉得对于一个普通的app来说可以这样配置这些设置:

    • Generate Debug Symbols:DEBUG和RELEASE下均设为YES(和Xcode默认一致);
    • Debug Information Level:DEBUG和RELEASE下均设为Compiler default(和Xcode默认一致);
    • Deployment Postprocessing:DEBUG下设为NO,RELEASE下设为YES,这样RELEASE模式下就可以去除符号缩减app的大小(但是似乎设置为YES后,会牵涉一些和bitcode有关的设置,对于bitcode暂时还不太了解(´・_・`));
    • Strip Linked Product:DEBUG下设为NO,RELEASE下设为YES,用于RELEASE模式下缩减app的大小;
    • Strip Style:DEBUG和RELEASE下均设为All Symbols(和Xcode默认一致);
    • Strip Debug Symbols During Copy:DEBUG下设为NO,RELEASE下设为YES
    • Debug Information Format:DEBUG下设为DWARF,RELEASE下设为DWARF with dSYM File,dSYM文件需要用于符号化crash log(和Xcode默认一致);


    https://www.jianshu.com/p/11710e7ab661
     
    2.限制uitextfiled输入
        [self.name addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventEditingChanged];
    
    - (void)textChange:(UITextField *)textField
    {
        NSString *str = [self filterString3:textField.text];
        
        textField.text = str;
    }
    
    - (NSString *)filterString3:(NSString *)str {
        //只能输入英文和数字
        NSString *regex = @"[^a-zA-Z0-9]";
        return [str stringByReplacingOccurrencesOfString:regex withString:@"" options:NSRegularExpressionSearch range:NSMakeRange(0, str.length)];
    }
     
     
     
  • 相关阅读:
    隐语义模型LFM
    基于内容的推荐、协同过滤
    评定标准
    函数式模型示例
    函数式模型概述
    序贯模型
    seq2seq
    链队列
    顺序栈
    线性表的静态链表存储结构
  • 原文地址:https://www.cnblogs.com/javastart/p/10768010.html
Copyright © 2020-2023  润新知