自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(43)
  • 资源 (6)
  • 收藏
  • 关注

原创 xcode 调试断点

参考[1] http://developer.apple.com/library/ios/#recipes/xcode_help-breakpoint_navigator/articles/about_breakpoint_navigator.html#//apple_ref/doc/uid/TP40010433-CH6-SW1调试程序时,断点是必不可少的工具,下面介绍一下断点具体使用

2013-01-27 18:19:56 8901

原创 Quartz 2D - 绘线

参考[1]https://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html[2]https://developer.mozilla.org/en-US/docs/HTML/Canvas/Tutorial/Applying_st

2012-12-19 00:59:07 1618 1

原创 Quartz 2D Programming Guide -Pattern

参考[1]http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_overview/dq_overview.html[2]raywenderlish Core Graphics 101: 模版Pattern 可以翻译为模板,或者

2012-12-13 22:26:07 1392

原创 Quartz 2D 裁剪

参考使用Quartz 2D 可以对图片进行裁剪,简单的可以裁剪一个矩形,复杂的可以根据CGPath实现裁剪,也可以使用UIBezierPath进行裁剪,也可以使用一个UIImage做为mask进行裁剪。对于如下图片,不使用裁剪时,显示全部内容使用CGContextClipToRect裁剪矩形,UIImage* imageSrc = [UIImage imag

2012-12-09 22:04:24 4919

原创 Quartz 2D Programming Guide-Transforms

参考:[1]http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_affine/dq_affine.html#//apple_ref/doc/uid/TP30001066-CH204-CJBECIAD[2]http://www.cnblo

2012-12-09 17:08:30 1392 1

原创 非零环绕数规则和奇-偶规则(Non-Zero Winding Number Rule&&Odd-even Rule)

参考[1]http://www.cs.rit.edu/~icss571/filling/alt_parity.html[2]http://cs.hust.edu.cn/webroot/courses/csgraphics/jiaocai.php?bookpage=5_c_c[3]http://en.wikipedia.org/wiki/Nonzero-rule在图形学中判断

2012-12-08 17:51:11 12256 6

原创 Quartz 2D Programming Guide --Transparency Layers

参考[1]http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_trans_layers/dq_trans_layers.html#//apple_ref/doc/uid/TP30001066-CH210-TPXREF101透明层

2012-12-04 22:40:10 1129

原创 Xcode4.5中app字符串&xib&图片资源的本地化

参考[1]http://www.raywenderlich.com/2876/how-to-localize-an-iphone-app-tutorialapp的本地化,除了app名称的本地化,还包括程序中使用文字的本地化、xib资源的本地化(按钮等)、图片资源的本地化,本文分别介绍这三者的本地化1.使用文字的本地化1)在工程文件中右击,”new file“,选择string Fi

2012-11-29 18:48:56 1832

原创 Xcode4.5中app名称本地化

参考[1]http://developer.apple.com/library/ios/#documentation/MacOSX/Conceptual/BPInternational/Articles/LocalizingPathnames.html#//apple_ref/doc/uid/20002141-BBCFJBFBapp如果会在不同的国家发行,那么就需要为app

2012-11-29 16:43:54 1893

原创 Event Handling Guide for iOS

参考[1]http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009541-CH1-SW11.事件类型主要是 触摸事件,动作事件

2012-11-17 16:38:09 974

原创 UIView只收集move轨迹,不接收“单击”、“长按”事件

参考:[1]http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/MultitouchEvents/MultitouchEvents.html#//apple_ref/doc/uid/TP40009541-CH3-SW20情景:如果

2012-11-17 16:11:31 1504

原创 光标移动

参考:[1]http://stackoverflow.com/questions/8194712/ios-how-to-move-cursor-to-the-beginning-of-the-current-line-in-uitextview在UITextInput协议中,有selectedTextRange来表示光标的起始和结束位置,如果start和end相同则表示光标选中内容

2012-10-10 16:00:39 3286

原创 block 学习笔记

1.block 用到的局部变量是 只读的,将关键字__block 定义局部变量 则变为可读写。2.如果局部变量类型是 基本数据类型,比如NSinteger,那么block使用局部变量其实是其拷贝,类似于函数参数传值方式,所以在定义block之后修改局部变量对block代码块的内容没有影响。 NSInteger outNum11 = 10; NSInteger (^blockOne1

2012-09-02 12:03:12 849

转载 What's the difference between Quartz Core, Core Graphics and Quartz 2D?

参考[1]http://stackoverflow.com/questions/1877987/whats-the-difference-between-quartz-core-core-graphics-and-quartz-2d Quartz 2D 是Core Graphic 的一部分,Quartz是一组函数、数据类型以及对象,专门设计用于直接在内存中对视图或图像进行绘制。

2012-08-24 11:16:43 1785

转载 iphone push机制

参考:[1]http://mobiforge.com/developing/story/programming-apple-push-notification-services[2]https://github.com/stefanhafeneger/PushMeBaby[3]http://quickblox.com/developers/How_to_create_APNS_cert

2012-08-18 23:26:02 1034

原创 CALayer shadow &

参考:[1]http://www.raywenderlich.com/2502/introduction-to-calayers-tutorial[2]http://www.raywenderlich.com/2079/core-graphics-101-shadows-and-gloss[3]http://www.raywenderlich.com/tutorials

2012-08-09 20:33:21 969

原创 动态设置是否锁屏等

参考[1]http://stackoverflow.com/questions/832940/programmatically-lock-and-unlock-iphone-screen[2]http://stackoverflow.com/questions/4476777/how-to-set-lock-screen-wallpaper-and-ringtone-programmati

2012-06-27 11:33:56 1996

原创 git help

参考:[1]https://help.github.com/[2]http://lugir.com/git-basic.html1.设置用户名于邮箱 git config --global user.name "Your Name" git config --global user.email chengfeilv@gmail.com2.初始化 git 仓库mkdir

2012-06-13 20:19:29 618

原创 iphone develop tips

一些iphone的小细节,小技巧1.时间戳[cpp] view plaincopyNSTimeInterval interval = [[NSDate date] timeIntervalSince1970];  NSString* timeStamp = [NSString stringWithFormat:@"hex=%x,dec=%d,milSec=%.3f",(NS

2012-06-13 10:36:55 1320

原创 序列化NSKeyedArchiver

参考:[1].https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Archiving/Archiving.html#//apple_ref/doc/uid/10000047i@interface PKAnimationItem : NSObject{ NSString* title_;

2012-06-13 00:24:24 914

原创 重写isEqual方法和hash方法

参考:[1]http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html[2]http://www.karlkraft.com/index.php/2008/01/07/equality-vs-identity/判断对象是否相同是经常用到的,因此在NSobject中就有

2012-05-05 18:26:46 2218

转载 mysql 创建用户

参考:[1]http://www.codesky.net/article/201010/147160.html1.MySQL命令行新建用户//登录MYSQL@>mysql -u root -p@>密码//创建用户mysql> insert into mysql.user(Host,User,Password) values('localhost','phpl

2012-05-04 13:41:39 542

原创 NSString 使用

1.NSString to NSData NSString* str= @"teststring"; NSData* data = [str dataUsingEncoding:NSUTF8StringEncoding]; NSData* data = [NSData dataWithBytes:[str UTF8String] length:strlen([str UTF8String]

2012-04-13 13:28:38 697

转载 Instagram揭秘:牛逼的图片服务都在用哪些装备和技术

Instagram揭秘:牛逼的图片服务都在用哪些装备和技术操作系统选用Ubuntu Natty,load balancing设备使用Amazon’s Elastic Load Balancer,DNS选择Amazon’s Route53;以Amazon High-CPU Extra-Large设备作为应用服务器,运行Django来处理应用的请求;使用Gunicorn作为WSGI ser

2012-04-11 20:00:59 1162

原创 shell 遍历数组

#!/bin/shecho "Test Use Array 1"ITEMARR="1 2 3"for channel in ${ITEMARR[@]}; do echo "item index:" $channeldoneecho "Test Use Array 2"for channel in "1 2 3"; do echo "item index:" $cha

2012-04-09 11:56:40 1310

原创 对象的copy&mutableCopy

参考:[1]参考库:内存管理编程指南将一个指针p1直接赋值给另外一个指针p2,即:p2=p1,其实p1,p2指向的同一个实例对象,任何对p1进行的操作都会影响p2,因为他们指向同个地址的实例对象。具体的就不说了,所以如果需要拷贝一个对象,而不只是指针赋值,在C++中有“拷贝构造函数”来实现此功能。objetive-c则通过copy和mutableCopy方法来实现。首先,obj

2012-03-22 23:13:29 706

原创 有用链接

【1】NSObject等源代码,虽然比较老了,但还是体现了其思想【2】nib2objc:将nib转为objetive-c代码的工具【3】MKNetwork 博客   和  代码【4】AFNetworking,基于NSUrlConnection等上层封装网络库   不断添加...

2012-03-22 00:05:07 705

原创 使用NSMethodSignature和NSInvocation实现消息转发

参考:[1]http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSInvocation_Class/Reference/Reference.html[2]http://developer.apple.com/library/ios/#documentation/C

2012-03-21 23:44:35 6022

转载 sed替换跨行内容

参考:[1]http://www.fwolf.com/blog/post/346sed是*nix下方便的行编辑工具,经常用来替换文件的内容,sed一般都是处理单行的,但通过它的一些内建功能,也能实现跨行替换(即要替换的内容有多行内容)。解决方法主要来自网上搜到的一篇文章,但文中的大侠并没有解释得特别清楚,我对照着其他两个更晦涩的例子(一、二),结合man搞懂了之后,

2012-03-19 18:03:24 1264

原创 Http 请求

同步方式1,使用NSStringNSString* str = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://baidu.com"] encoding:NSUTF8StringEncoding error:nil];2,使用NSDataNSData* data = [NSData da

2012-03-15 16:27:12 973

原创 app中自定义url

参考:[1]http://wiki.akosma.com/IPhone_URL_Schemes[2]http://www.idev101.com/code/Objective-C/custom_url_schemes.html在iphoneapp中使用如下代码,即可在app中跳转到safari并打开网址,其实每个app都可以定义一个独的url,实现从其他app跳转。比如系统电话的url

2012-03-14 13:55:15 1086

原创 inside Objective-C

http://www.faqs.org/faqs/computer-lang/Objective-C/faq/http://www.learn-cocos2d.com/2011/10/complete-list-objectivec-20-compiler-directives/http://www.webweavertech.com/ovidiu/Objective-C/index.

2012-03-08 01:04:08 599

原创 锁屏或按Home键后继续播放音乐

参考:[1]http://www.apple.com.cn/developer/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AudioandVideoTechnologies/AudioandVideoTechnologies.html#//apple_ref/doc/uid/TP4000707

2012-03-06 21:54:43 7339

转载 Managing Toll-Free Bridging

参考:[1]http://www.oschina.net/question/54100_36217[2]http://wangjun.easymorse.com/?p=1664在cocoa application的应用中,我们有时会使用Core Foundation(CF),我们经常会在Objective-C和CF之间进行转化。系统使用arc的状态下,编译器不能自动管理CF的内

2012-02-29 00:27:31 922 2

原创 class-dump

参考:[1]http://www.codethecode.com/projects/class-dump/[2]http://blog.csdn.net/linkai5696/article/details/5803991Usageclass-dump 3.3.4 (64 bit)Usage: class-dump [options] where opti

2012-02-15 21:02:28 735

原创 URL encode

参考[1]http://simonwoodside.com/weblog/2009/4/22/how_to_really_url_encode/1系统提供了stringByAddingPercentEscapesUsingEncoding 函数实现url 编码,但是测试发现“,”都没有被编码,不知道为什么,后来搜到参考1所示。以下是测试代码 NSString* str = @"

2012-02-02 18:29:53 475

原创 Makefile&shell

参考[1]Makefile 详细介绍 http://www.linuxsir.org/main/doc/gnumake/GNUmake_v3.80-zh_CN_html/index.html[2]shell 鸟哥 http://vbird.dic.ksu.edu.tw/linux_basic/linux_basic.php[3]http://my.unix-center.net/~Si

2012-02-02 16:58:59 476

原创 iphone Apps of open source

参考[1]http://maniacdev.com/2010/06/35-open-source-iphone-app-store-apps-updated-with-10-new-apps/[2]http://www.edumobile.org/iphone/iphone-programming-tutorials/25-amazing-open-source-iphone-apps/

2012-01-18 17:41:02 896

转载 五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT) – 整理

参考[1]http://www.awflasher.com/blog/archives/939当Adobe、Microsoft、Sun等一系列巨头开始表现出对”开源”的青睐时,”开源”的时代即将到来!最初来自:sinoprise.com/read.php?tid-662-page-e-fpage-1.html(遗憾的是这个链接已经打不开了),我基本未改动,只是进行了一些排版和整

2012-01-17 17:50:32 505

转载 ssh相关

参考:[1]http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/[2]http://bbs.chinaunix.net/thread-2113237-1-1.html安全外壳协议(Secure Shell Prot

2012-01-17 15:25:22 722

iOS Hacker's Handbook

Hacker's Handbook However, while these devices were beautiful on the outside, there was little known about how they worked on the inside. In particular, how secure were these little devices that millions of people were carrying around filled with their personal information? The information about how the security of iOS devices operated was scattered in various talks given at security conferences, within the jailbreak community, and in individual researchers' personal journals. This book is intended to bring all this knowledge about iOS internals to one central location. Making this information accessible to everyone allows people and enterprises to assess the risk of using these devices and how best to mitigate this risk. It might even provide ideas on how to make the device safer and more secure to use.

2013-03-16

Hacking.and.Securing.iOS.Applications

Hacking.and.Securing.iOS.Applications

2013-03-16

核心动画编程指南

Core Animation Programming Guide 的中文翻译,给需要的人

2012-12-02

cocoa design pattern

Cocoa设计模式 http://book.douban.com/subject/5323430/ 本书介绍了Cocoa框架中用到的面向对象的设计模式。这是英文原版,非常清晰!

2012-02-15

精通Objective-C设计模式

精通Objective-C设计模式 是讲述ios平台设计模式的第一本书,这是英文原版,非常清晰,不要错过!

2012-02-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除