平时常用的小知识点 (不断更新中)

添加代码注释的插件时需更改的UDID获取方法 

defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID

NSUrl中存在汉字的解决办法是:

urlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

修改系统导航栏上的标题字体样式

    self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:143.0/255.0 green:208.0/255.0 blue:106.0/255.0 alpha:1];
    self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor],
                                                                    NSFontAttributeName : [UIFont boldSystemFontOfSize:20]};

 本地查找数组中的字符串并存储到新的数组中

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF contains [c] %@", filterString];

    dataSourceArray = [NSMutableArray arrayWithArray:[dataArr filteredArrayUsingPredicate:predicate]];
原文地址:https://www.cnblogs.com/machealking/p/4644607.html