
开发
AimeeNing
这个作者很懒,什么都没留下…
展开
-
解决UIImageView的tintColor无效的问题
UIImage *img = [img imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];UIImageView *imgView = [[UIImageView alloc] initWithImage:img];imgView.tintColor = [UIColor......];原创 2015-09-06 15:34:21 · 2887 阅读 · 0 评论 -
Xcode Instruments之iprofiler
iprofiler是一个命令行工具,与Instruments的作用相同,可以用来采集app数据,采集的数据放在.dtps的文件里,并能用Instruments打开。iprofiler现支持下列功能:Activity Monitor、Allocations、Counters、Event Profiler、Leaks、System Trace、Time Profiler。原创 2015-01-15 14:17:16 · 1834 阅读 · 1 评论 -
iOS8修改状态栏StatusBar字体颜色
今天修改StatusBar的字体颜色,发现iOS8上只用[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];是没有效果的,在网上查了下,按照这里提供的方法http://www.cocoachina.com/bbs/read.php?tid=246354修改成功,具体是:原创 2015-01-16 11:36:02 · 3014 阅读 · 0 评论 -
UITableView的多选删除和滑动删除并存
实现tableView的多选删除,开始的时候使用- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{ returnUITableViewCellEditingStyleInsert |原创 2015-02-26 16:55:34 · 1597 阅读 · 0 评论 -
代码实现将excel转换成plist文件
需要在本地存储一些不变的数据,但这些数据存在excel表格里,怎么使用它们呢?一种方法是将excel转换成plist文件。excel表格的内容类似于SchoolID SchoolName0000001 中学10000002 中学20000003 中学3原创 2015-03-18 09:18:21 · 4285 阅读 · 2 评论 -
一个UILabel上显示不同的字体、颜色
NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"hello world hello world"]; [str addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOf原创 2015-03-19 14:33:47 · 554 阅读 · 0 评论 -
iOS 分别使用GDataXML和KissXML生成xml
使用GDataXML生成xmlGDataXML只有两个文件GDataXMLNode.h和GDataXMLNode.m。使用方法如下:将文件包含进工程后,添加libxml2.dylib:之后添加路径${SDK_ROOT}/usr/include/libxml2:原创 2015-03-21 11:59:30 · 3133 阅读 · 1 评论 -
iOS与WebService通信,内容包含“尖括号”返回异常
与WebService怎样通信网上有很多资料可以查到,就不做说明了。在往WebService传输字符串时,发现如果字符串中包含“”,返回的结果就会异常:Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: internal server error (500)" UserI原创 2015-03-21 14:05:44 · 1139 阅读 · 0 评论 -
UITableView编辑状态下只显示排序图标
UITableView在编辑状态下,带有排序功能时,是如下显示的:如果不想要左边的删除按钮,只想要排序功能,则添加如下代码即可:- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{ r原创 2015-03-21 15:25:40 · 1156 阅读 · 0 评论 -
Objective-C method XXX conflicts with optional requirement method XXX
Objective-C method XXX conflicts with optional requirement method XXX原创 2015-07-17 12:52:12 · 1247 阅读 · 0 评论 -
在Playground里怎样引用自定义类
自定义了一个类,想在Playground里试验,于是在Playground里包含了该类,却怎么也引用不了原创 2015-07-24 09:34:32 · 1402 阅读 · 0 评论 -
iOS 将汉字转换为拼音
转自http://blog.youkuaiyun.com/meegomeego/article/details/23253939#comments之前做通讯录相关的一些App时,有一个比较常用的算法是将汉字转换成拼音。当时采用的做法是:将各个拼音段的首个汉字(按Unicode排序)做成两个数组,一个数组存拼音,另一个数组存拼音对应首个汉字的Unicode。如果要获取某个汉字的拼音,可以折半转载 2015-08-03 10:00:12 · 633 阅读 · 0 评论 -
怎样在不打开Xcode的情况下打开模拟器
我用的是Xcode6.4,进入Finder目录“Applications/Xcode.app/Contents/Developer/Applications”,找到iOS Simulator.app,将其拖拽到Dock即可!原创 2015-08-04 22:09:13 · 789 阅读 · 0 评论 -
怎样理解iPhone6 Plus的分辨率
转自http://tieba.baidu.com/p/3295751098转自微信@richardbao 详解 iPhone 6 Plus 的奇葩分辨率现如今 iPhone 在尺寸上终于“百花齐放”了,有点向 Android 世界发展的趋势。至日前 Apple 发布 iPhone 6 和 iPhone 6 Plus 时,iPhone 家族有了如下五种不同转载 2015-08-31 14:40:29 · 766 阅读 · 0 评论 -
Xcode Instruments之概述
Xcode Instruments简介原创 2015-01-13 15:53:49 · 964 阅读 · 0 评论