10 2013 档案

摘要:一、编译针对iOS平台的ffmpeg库(kxmovie)近期有一个项目,需要播放各种格式的音频、视频以及网络摄像头实时监控的视频流数据,经过多种折腾之后,最后选择了kxmovie,kxmovie项目已经整合了ffmpeg和简单的播放器,具体可以参考kxmovie主页:https://github.com/kolyvan/kxmoviegit clone git://github.com/kolyvan/kxmovie.gitcd kxmoviegit submodule update --init rake二、使用kxmovie1.把kxmovie/output文件夹下文件添加到工程2.添加框 阅读全文
posted @ 2013-10-25 01:43 Asial 阅读(1188) 评论(0) 推荐(0)
摘要:UIlabel换行 NSString * labelStr = @“你好,这是UILabel的自动换行测试内容,主要实现多行数据的自动换行,自适应不同行数的数据”; CGSize labelSize = {0, 0}; labelSize = [labelStr sizeWithFont:[UIFont systemFontOfSize:14] constrainedToSize:CGSizeMake(200.0, 5000) lineBreakMode:UILineBreakMod... 阅读全文
posted @ 2013-10-24 22:35 Asial 阅读(5150) 评论(0) 推荐(0)
摘要:参考开发者指南那份Demo,效果如图,ASI强大的功能使用异步队列下载更为简便代码如下://开始队列- (IBAction)fetchThreeImages:(id)sender{ // UI清空 [imageView1 setImage:nil]; [imageView2 setImage:nil]; [imageView3 setImage:nil]; self.progressIndicator.progress = 0.0; self.imageProgressIndicator1.progress = 0.0; self.imageProgr... 阅读全文
posted @ 2013-10-22 00:34 Asial 阅读(481) 评论(0) 推荐(0)
摘要:项目需要适配ios7,在启动页面原来ios6可以运行的alertView上加addsubView已经不起作用,所以决定自己写一个alertView。思路也就是自己做模态蒙板半透明的,给view做show,和close的动画。下面上代码,动画部分是直接取自己code4上面的。点击按钮#import - (void)show{ self.STAlertView.center = self.view.center; [self.view addSubview:self.STAlertView]; CAKeyframeAnimation *popAnimation = [CAKey... 阅读全文
posted @ 2013-10-15 09:52 Asial 阅读(1288) 评论(0) 推荐(0)
摘要:在程序启动代理内加入如下代码:NSString *applicationDocumentsDirectory() {return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; }void UncaughtExceptionHandler(NSException *exception) { NSArray *arr = [exception callStackSymbols]; NSString *reason = [exception reason];. 阅读全文
posted @ 2013-10-11 17:10 Asial 阅读(314) 评论(0) 推荐(0)
摘要:if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {instead为if ([inputStream streamStatus] == (NSStreamStatus)NSStreamEventErrorOccurred) {return [[NSDate date] addTimeInterval:maxAge];instead为return [[NSDate date] dateByAddingTimeInterval:maxAge]; 阅读全文
posted @ 2013-10-11 09:38 Asial 阅读(362) 评论(0) 推荐(0)
摘要:if ([[[UIDevice currentDevice] systemVersion] floatValue]>=7) { [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; self.window.frame=CGRectMake(0, 20, self.window.frame.size.width, self.window.frame.size.height-20); }info.plist加入View controller-based... 阅读全文
posted @ 2013-10-09 14:03 Asial 阅读(260) 评论(0) 推荐(0)