- 博客(20)
- 资源 (15)
- 收藏
- 关注
原创 IOS中SQLite3使用
一. 为项目添加sqlite3支持框架二. sqlite3常用函数介绍 1.打开数据库int sqlite3_open( const char *filename, // 数据库的文件路径 sqlite3 **ppDb // 数据库实例); 2.执行任何SQL语句int sqlite3_exec
2015-03-11 16:14:07
581
原创 IOS之CALayer学习总结
CALayer简介1. CALayer是核心动画的基础,通过设置CALayer属性可以做圆角,边框,阴影等效果.2. 每个UIView内部都有一个CALayer类型的属性layer.3. 在实现核心动画时,本质上是把CALayer中的内容转换成位图,从而便于图形硬件的操作。CALayer一些常用属性设置设置UIView的layer属
2014-07-31 16:17:12
652
原创 IOS中KVC和KVO理解
什么是KVC?KVC是Key Value coding的缩写,也就是键值编码,从名字很难理解它是做什么用的。学过java的朋友对java的反射一定不陌生,我认为KVC有点类似Java的反射(只是类似不等同于反射)。在IOS中我们为一个属性赋值通常使用Object.Property=Value的形式,那么有了KVC之后,现在我们可以换一种方式了.比如一个Person类@interfa
2014-07-29 21:44:34
558
原创 IOS之Quartz2D绘图7.重绘View上的文字
在需要重绘的时候,我们不要直接调用drawRect方法,要调用setNeedsDisplay方法先上界面效果图完整代码下载
2014-07-24 16:21:02
556
原创 IOS之Quartz2D绘图5.绘制UITableViewCell渐变背景
绘制UITableViewCell的渐变背景的思路绘制渐变的背景图片得到背景图片后设置ContentView的背景颜色-(UIImage *)backImage{ CGSize size=CGSizeMake(320,44); UIGraphicsBeginImageContext(size); CGColorSpaceRefcolo
2014-07-24 16:15:41
593
原创 IOS之Quartz2D绘图6.PDF文档生成
使用quartz2d生成pdf文档,我们需要创建pdf文档的上下文UIGraphicsBeginPDFContextToFile第一个参数为PDF文档存储路迹,通过下面代码获取document的路径NSArray*array=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
2014-07-24 16:14:58
1016
原创 IOS之Quartz2D绘图4.径向渐变和线性渐变
Quartz2D渐变绘制渐变的一般步骤创建颜色空间 CGColorSpaceRefcolorSpaceRef=CGColorSpaceCreateDeviceRGB(); 渐变的色谱 CGFloatcolors[8]={1.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0}; 渐变的开始到结束比例0--1 CGFloat locations[2]={0.0,1
2014-07-24 16:11:02
1768
原创 IOS之Quartz2D绘图3.为图片添加水印文字
为图片添加水印步骤建立图像上下文得到UIImage对象绘制图像在制定位置绘制文字得到图像上下文的图像关闭图像上下文运行效果-(UIImage *) waterMaskImage{CGSizeimageSize=CGSizeMake(320,300); //建立图像上下文并指定图像的大小UIGraphicsBeginImag
2014-07-24 11:05:07
756
原创 IOS之Quartz2D绘图2.随机绘制五角星
1. 单个五角星绘制上次讲了在IOS中使用quartz2d绘制基本的图形,今天来绘制一个比较复杂的图形—五角星,五角星大家都很熟悉。先来分析下五角星的画法,一个五角星如图所示。1. 先把一个圆周平均五等分,那么每个角度是360/5,然后隔点进行连线就可以绘制五角星2. 每个连线的夹角就是360/5*2,但是在IOS的正弦余弦计算采用的是弧度制。这里有必要复习下
2014-07-23 14:32:35
4001
转载 Objective-c 重写 isEqual 和 hash 方法
Welcome back to a late edition of Friday Q&A. WWDC pushed the schedule back one week, but it's finally time for another one. This week, I'm going to discuss the implementation of equality and hashing
2012-09-04 09:20:52
1603
翻译 13. The Greenwood boys
The Greenwood Boys are a group of pop singers. They are visiting all parts of the country. They will be arriving here tomorrow. they will be coming by train and most of young people in the town will
2011-12-12 21:49:21
473
原创 36.Across the Channel
Debbie Hart is going to swim across English Channel tomorrow. she is going to set out from French coast at five o'clock in the morning. Debbie is only eleven years old and she hopes to set up new wor...
2011-11-01 13:05:02
200
原创 39 Am I All Right
While Mr. John Gilber was in hospital, he aske his doctor to tell him whether his operation had been successful, but the doctor refused to do so. The following day, he asked a bedside telephone. When ...
2011-10-28 13:05:55
125
原创 38. Everything except the weahter
My old friend, Harrison, had lived in the Mediterrannean for many years before he returned to England. He had often dreamed of retiring in England and hand planned settle down in the country. He...
2011-10-27 13:25:57
196
原创 37.The Olympic Game
The Olympic Games will be held in our country. As a great many people will be visiting the country, the government will be building new hotels, an immense stadium and an Olympic-standard swimming pool...
2011-10-21 13:28:57
353
生产者与消费者Java实现
Container类[code="java"]package multithread.producerandconsumer;public class Container { static int size=5; int index=0; String [] container=new String[size]; synchronized public vo...
2011-10-20 14:08:46
100
原创 SCJP通过,没有想象中的那么开心
今天去考了scjp,正确率93%,但是没有想象中的那么开心,现在心情很平静,感觉就算我拿到了这证书,也不能够代表什么。继续努力吧。
2009-12-21 16:06:00
544
3
原创 面朝大海 春暖花开
《面朝大海 春暖花开》 海子从明天起,做一个幸福的人喂马,劈柴,周游世界从明天起,关心粮食和蔬菜我有一所房子,面朝大海,春暖花开从明天起,和每一个亲人通信告诉他们我的幸福那幸福的闪电告诉我的我将告诉每一个人给每一条河每一座山取一个温暖的名字陌生人,我也为你祝福愿你有一个灿烂的前程愿你有情人终成眷属愿你在尘世获得幸福我只愿面朝大海,春暖花开
2009-03-29 12:33:00
292
CALayer学习代码
2014-07-31
IOS中KVC和KVO用法demo
2014-07-29
网上商城系统+完全开发文档(JSP+servlet)
2008-12-13
密码管理器(Java)GUI
2008-12-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人