随笔分类 -  ios--[开发技术]

摘要:http://www.cnblogs.com/stephen-liu74/archive/2012/01/22/2328757.html 阅读全文
posted @ 2014-06-13 10:32 ejllen 阅读(125) 评论(0) 推荐(0)
摘要:一、获取表的Schema信息: 1). 动态创建表。 2). 根据sqlite3提供的API,获取表字段的信息,如字段数量以及每个字段的类型。 3). 删除该表。 见以下代码及关键性注释:1 #include 2 #include 34 using namespace std;56 void doT... 阅读全文
posted @ 2014-06-13 10:30 ejllen 阅读(169) 评论(0) 推荐(0)
摘要:由于在iPhone3.0上已经支持了Core Data,是苹果一个新的API,并且是基于SQlite的。速度也是非常快吧。所以我们对SQLite仅需要懂一些即可,以下是一些基础信息一、:常用接口(2个重要结构体和5个主要函数)sqlite3 *pdb, 数据库句柄,跟文件句柄 FILE 很... 阅读全文
posted @ 2014-06-13 10:27 ejllen 阅读(625) 评论(0) 推荐(0)
摘要:方法一:if([[dictionary allKeys] containsObject:key){ // contains key} 方法二:if([dictionary objectForKey:key]){ //objectForKey will return nil if a key d... 阅读全文
posted @ 2014-06-12 19:02 ejllen 阅读(751) 评论(0) 推荐(0)
摘要:NSString* string;// 结果字符串02NSString* string1, string2;//已存在的字符串,需要将string1和string2连接起来0304//方法1.05string = [NSString initWithFormat:@"%@,%@", string1,... 阅读全文
posted @ 2014-06-12 17:02 ejllen 阅读(296) 评论(0) 推荐(0)
摘要:NSRange的定义typedefstruct_NSRange{NSUIntegerlocation;NSUIntegerlength;}NSRange;NSRange是一个结构体,其中location是一个以0为开始的index,length是表示对象的长度。他们都是NSUInteger类型。而N... 阅读全文
posted @ 2014-06-12 17:01 ejllen 阅读(649) 评论(0) 推荐(0)
摘要:ASIHTTPRequest对CFNetwork API进行了封装,并且使用起来非常简单,用Objective-C编写,可以很好的应用在Mac OS X系统和iOS平台的应用程序中。ASIHTTPRequest适用于基本的HTTP请求,和基于REST的服务之间的交互。ASIHTTPRequest功能... 阅读全文
posted @ 2014-06-12 10:54 ejllen 阅读(178) 评论(0) 推荐(0)
摘要:打开数据库链接sqlite3_open用法原型:int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb /* OUT: SQLite db handle *... 阅读全文
posted @ 2014-06-10 13:46 ejllen 阅读(485) 评论(0) 推荐(0)
摘要:CSV全称 Comma Separated values,是一种用来存储数据的纯文本文件格式,通常用于电子表格或数据库软件。用Excel或者Numbers都可以导出CSV格式的数据。CSV文件的规则0 开头是不留空,以行为单位。 1 可含或不含列名,含列名则居文件第一行。2 一行数据不垮行,无空行... 阅读全文
posted @ 2014-06-09 17:56 ejllen 阅读(523) 评论(0) 推荐(0)
摘要:iOS程序有固定的文件访问限制,只能在自己的沙盒内。 UIImage *img=[UIImage imageNamed:@"cellicon.png"];这段代码从相对路径加载了一个png图片资源作为UIImage对象,没有任何问题。因为它在内部已经偷偷得帮你把路径转化为相对路径了,你还不知道吧! ... 阅读全文
posted @ 2014-06-09 17:29 ejllen 阅读(1337) 评论(0) 推荐(0)
摘要:一.Eclipse的下载 到网站:http://www.eclipse.org/downloads/ 上,由于我们是用Java开发的所以步骤如下:找到“Eclipse IDE for java Developers”此处右上角会根据你当前使用的系统自动选择,Mac下就会自动选择位“Mac OS X(... 阅读全文
posted @ 2014-06-09 16:58 ejllen 阅读(161) 评论(0) 推荐(0)
摘要:对于有多行文字的UILabel而言,需要设置UILabel的numberoflines属性,此属性默认是1,也就是只显示一行,多余的会以尾部,中间的方式进行截断,具体要看你的初始设置。在这里可以将其设置为numberoflines=0, 不限制label的行数,以实际文字数来确定行数。但是在解决行数... 阅读全文
posted @ 2014-06-05 13:25 ejllen 阅读(273) 评论(0) 推荐(0)
摘要:UIScrollView 常用属性scrollView.maximumZoomScale= 2.0; // 缩放最大比例scrollView.minimumZoomScale = 0.2;// 缩放最小比例scrollView.contentSize= self.view.frame.size +... 阅读全文
posted @ 2014-06-03 16:42 ejllen 阅读(367) 评论(0) 推荐(0)
摘要:其余的请见:http://blog.csdn.net/totogo2010/article/details/86159401、UIGestureRecognizer介绍手势识别在iOS上非常重要,手势操作移动设备的重要特征,极大的增加了移动设备使用便捷性。iOS系统在3.2以后,为方便开发这使用一些... 阅读全文
posted @ 2014-06-03 14:21 ejllen 阅读(291) 评论(0) 推荐(0)
摘要:决定了是否用户触发的事件被该视图对象忽略和把该视图对象从事件响应队列中移除。 阅读全文
posted @ 2014-06-03 10:26 ejllen 阅读(140) 评论(0) 推荐(0)
摘要:2.+(id)shareInstance;外界初始化得到单例类对象的唯一借口,这个类方法返回的就是instance,即类的一个对象,如果instance为空,则实例化一个对象,如果不为空,则直接返回。这样保证了实例的唯一。 阅读全文
posted @ 2014-05-29 10:59 ejllen 阅读(400) 评论(0) 推荐(0)
摘要:UISearchBar控件就是要为你完成搜索功能的一个专用控件。它集成了很多你意想不到的功能和特点!首先,还是来普及一下UISearchBar控件API相关的属性和方法吧!UISearchBar属性相关_searchBar = [[UISearchBar alloc] initWithFrame:C... 阅读全文
posted @ 2014-05-28 00:02 ejllen 阅读(559) 评论(0) 推荐(0)
摘要:太长了,请看 http://blog.csdn.net/xdrt81y/article/details/9128695performSelector:performSelector:withObject:performSelector:withObject:withObject:实际调用[selfp... 阅读全文
posted @ 2014-05-27 19:20 ejllen 阅读(220) 评论(0) 推荐(0)
摘要:创建UITableViewController子类的实例后,IDE生成的代码中有如下段落:[cpp]view plaincopy-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath... 阅读全文
posted @ 2014-05-26 18:41 ejllen 阅读(263) 评论(0) 推荐(0)
摘要:显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool true隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool false 阅读全文
posted @ 2014-05-26 14:02 ejllen 阅读(159) 评论(0) 推荐(0)