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

添加代码注释的插件时需更改的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]];

 

posted @ 2015-07-14 09:37  Mac-one  阅读(149)  评论(0编辑  收藏  举报