
IOS开发
lansekj
这个作者很懒,什么都没留下…
展开
-
程序后台保活-接收网络数据
- (void)createSocket { socketClient = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); NSLog(@"socketClient-------%d", socketClient); if (socketClient >= 0) { CFReadStreamRef readStr原创 2012-02-01 14:45:59 · 1607 阅读 · 0 评论 -
Paths
Paths中的几个重要元素 Points void CGContextMoveToPoint ( CGContextRef c, CGFloat x, CGFloat y ); 指定一个点成为current point Quartz会跟踪current point一般执行完一个相关函数后,current point都会相应的改变. Lines 相关的几个函转载 2012-08-13 09:58:52 · 546 阅读 · 0 评论 -
iOS 简单实现gif动画播放
本次实现gif动画播放是通过将动画文件读取到CGImageSourceRef,然后用NSTimer来播放的。 代码如下: 首先是头文件 #import #import #import @interface GifView : UIView {CGImageSourceRef gif; // 保存gif动画NSDictionary *gifProperties; // 保存gif动转载 2012-08-06 17:18:44 · 3173 阅读 · 1 评论 -
Reachability类检测网络状态
1、注册通知 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityIsChanged:) name:kReachabilityChangedNotification object:nil]; 2、创建Reachability实例对象并开启通知原创 2012-08-06 16:31:43 · 4873 阅读 · 0 评论 -
iOS4中Core Motion框架的介绍和使用
iOS4中Core Motion框架的介绍和使用 作为一个刚学习iPhone编程一周的人来说,其实写这篇文章的目的不是传道授业解惑,而是为了知识的总结。如果能吸引到各位为我传道授业解惑那再好不过了。文章基本的内容,整个流程是参照WWDC 2010上的session 423: Sensing Device Motion in iOS4写的,同时参考了开发文档Event Handling G转载 2012-08-06 15:05:06 · 4256 阅读 · 0 评论 -
iOS日历
1、计算当前周的第一天: NSDate *today = [NSDate date]; NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; // Get the weekday component of the current date N原创 2012-08-06 10:00:14 · 686 阅读 · 0 评论 -
分析IOS CrashLog的方法
Xcode提供的Orgainzer分析器加上symbolicatecrash,可以分析二进制文件以及源代码和crashlog之间的连接,直接找出源程序中出错的代码行。 symbolicatecrash所在路径:/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.frame原创 2012-08-03 10:14:58 · 2314 阅读 · 0 评论 -
iOS多张图片合成一个视频文件
转自:http://blog.iosxcode4.com/archives/160 用到的FrameWork有: MediaPlayer.framework,QuartzCore.framework,CoreVideoframework,CoreMedia.framework,AVFoundation.framework 代码如下: - (CVPixelBuff转载 2012-05-24 10:53:34 · 11997 阅读 · 3 评论 -
ios开发------程序中添加僵尸进程
(1)工程“Executables” (2)"Arguments" (3)"Variables to be set in the environment" (4)添加两个参数: MallocStackLogging-------------YES NSZombieEnabled----------------YES (5)终端命令“shell mal原创 2012-02-27 14:34:03 · 1429 阅读 · 0 评论