自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(145)
  • 资源 (3)
  • 收藏
  • 关注

原创 Objective-C的hook方案(一): Method Swizzling 转

http://blog.csdn.net/yiyaaixuexi/article/details/9374411

2014-04-29 13:30:45 435

原创 Objective-C相关Category的收集

http://www.cocoachina.com/applenews/devnews/2014/0212/7808.html

2014-04-29 13:30:43 283

原创 iOS开发socket程序被SIGPIPE信号Terminate的问题

以前在iphone上写socket的程序的时候,如果尝试send到一个disconnected socket上,就会让底层抛出一个SIGPIPE信号。 client端通过 pipe 发送信息到server端后,就关闭client端, 这时server端,返回信息给 client 端时就产生Broken pipe 信号了。对于产生信号,我们可以在产生信号前利用方法 signal(int si

2014-04-29 13:30:41 375

原创 H264中的SPS、PPS提取与作用

一、SDP协议介绍 SDP是会话描述协议的缩写,是描述流媒体初始化参数的格式,由IETF作为RFC 4566颁布牛逼的视频会议网站:http://wmnmtm.blog.163.com/blog/#m=0 ++++++++++++++++++++++++++++++++++++++++++++++++++++http://wmnmtm.blog.163.com/blog/static/38

2014-04-29 13:30:38 1074

原创 iPhone团购信息客户端的开发

[iPhone中级] iPhone团购信息客户端的开发 (一)http://blog.csdn.net/kangx6/article/details/7714140http://blog.csdn.net/kangx6/article/details/7714722http://blog.csdn.net/kangx6/article/details/7715376

2014-04-29 13:30:36 497

原创 Quartz 实现画图片、写文字、画线、椭圆、矩形、棱形等。三

/*绘制图片    NSString* imagePath = [[NSBundle mainBundle] pathForResource:@"dog" ofType:@"png"];    UIImage* myImageObj = [[UIImage alloc] initWithContentsOfFile:imagePath];    //[myImageObj drawAtPoint:

2014-04-29 13:30:34 568

原创 Quartz 实现画图片、写文字、画线、椭圆、矩形、棱形等 二

/*  NO.11     画一个实心的圆       CGContextFillEllipseInRect(context, CGRectMake(95, 95, 100.0, 100));    */                   /*NO.12     画一个菱形    CGContextSetLineWidth(context, 2.0);    CGContextSetStroke

2014-04-29 13:30:31 587

原创 Quartz 实现画图片、写文字、画线、椭圆、矩形、棱形等。

- (void)drawRect:(CGRect)rect{    CGContextRef context = UIGraphicsGetCurrentContext();               /*NO.1画一条线           CGContextSetRGBStrokeColor(context, 0.5, 0.5, 0.5, 0.5);//线条颜色     CGContextM

2014-04-29 13:30:28 501

原创 【转载】ios--弧形动画 椭圆动画

CAKeyframeAnimation *pathAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"];     pathAnimation.calculationMode = kCAAnimationPaced;     pathAnimation.fillMode = kCAFillModeForwards;  

2014-04-29 13:30:25 1703

原创 健康地奋斗着——程序员自己的养生书 转http://bbs.csdn.net/topics/390607937

2014-04-29 13:30:23 727

原创 IOS GCD timer用法

- (void)test1{    __block int timeout=300; //倒计时时间    dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);    dispatch_source_t _timer = dispatch_source_create(D

2014-04-29 13:30:20 921

原创 在ios6中“屏幕旋转控制”支持 nav Push某个vc单独旋转

在ios6中如果要实现设备“屏幕旋转”的效果,需要在该Controller中使用以下三个方法:?123456789101112131415//ios- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{       //return ;} //ios>6.0- (B

2014-04-29 13:30:18 849

原创 编译ffmpeg for x264 ,H264编码解码

In the posts, I will show how to use ffmpeg on iOS. This posts is a document for this project: https://github.com/lvjian700/ffmpegc-demo Now, ffmpec support x264 module. If you use the script before,

2014-04-29 13:30:16 1176

原创 ios一步一步编译ffmpeg,x264实现h264编码

关于编码的部分一直网上的资料不多,自己也整理了一下,理出一条可通的路子给大家。此篇文章的环境:xcode4.2 sdk5.0编译的版本:真机armv7 一,x264库的编译首先到http://www.videolan.org/developers/x264.html下载x264的库,然后解压。打开shell,进入x264的目录,执行如下语句CC=/Developer/Platforms/iPhon

2014-04-29 13:30:13 881

原创 将摄像头原始RGB数据流编码成H.264文件

查阅了很多资料,都是将YUV文件编码成H.264视频,几乎没有找到用摄像头数据直接存储为H.264文件的。以下是我的实现方法,借鉴了网上的一些做法,整合而成。需要先安装ffshowextern "C"{#include "avcodec.h"#include "avformat.h"#include "avio.h"#include "avutil.h"#include "common.h"#in

2014-04-29 13:30:11 1023 1

原创 FFMPEG学习参考 http://blog.csdn.net/maopig/article/category/847674

2014-04-29 13:30:09 502

原创 ios上 x264 编译

首先到http://www.videolan.org/developers/x264.html下载x264的库,然后解压命令行到目录输入CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin

2014-04-29 13:30:04 372

原创 iOS FileSize 转成string

NSString *fileURLString = [self.docInteractionController.URL path];    NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:fileURLString error:nil];    NSInteger fi

2014-04-29 13:30:02 873

原创 获取路由器的IP地址,手机的Hostname,手机的ip地址

//获取路由器的IP地址  需添加getgateway.c     getgateway.h   route.h#import #import "getgateway.h"#import #import #include #include #include #include #include #include #include #include #include #incl

2014-04-29 13:30:00 1402

原创 IOS-TextField

//初始化textfield并设置位置及大小  UITextField *text = [[UITextField alloc]initWithFrame:CGRectMake(20, 20, 130, 30)]; //设置边框样式,只有设置了才会显示边框样式    text.borderStyle = UITextBorderStyleRoundedRect;  typedef enum { 

2014-04-29 13:29:57 452

原创 Ios7修改status bar颜色

if (VersionNumber_iOS_7) {        myNavigationBar.frame = CGRectMake(0, 0,CGRectGetWidth(ScreenRect), 64);        [myNavigationBar setBackgroundImage:[UIImage imageNamed:@"all_nav-7"] forBarPosition:U

2014-04-29 13:29:55 531

原创 IOS 反射机制

有时候我们需要通过类名来生成相应类的实例,这就用到反射机制。首先通过类名生成Class类实例 在通过该Class 实例来创建(alloc)对象;具体方法会用到  NSClassFromString(类名) 一看就知道是C语言的东西;NSString * tempClassName = @"yourClassName";Class * tempClass =  NSClassFromString(t

2014-04-29 13:29:52 470

原创 push VC 后 旋转的问题

关于[self.navigationController pushViewController:xxVC animated:YES]后 xxVC不能再旋转,也就是说 Push出来的VC 设置旋转是无效的

2014-04-29 13:29:50 370

原创 ios7右滑禁用解决方案

//右滑禁用解决方案:首先你程序内用到了UINavigationController,然后编译的sdk为7.0的时候;你想禁用系统右滑手势时,找到最处于根navController    nav.interactivePopGestureRecognizer.enabled = NO;

2014-04-29 13:29:48 390

原创 动画浅析-CAAnimation和CATransition

现在明白了,要做动画。需要用到CATransition类!那就学习一下吧!先贴一个入门代码![_imgPic setImage:image];// 设置新的图片                                CATransition *animation = [CATransition animation];           [animation setDuration:1.0

2014-04-29 13:29:46 342

原创 IOS开动画效果之──实现 pushViewController 默认动画效果(转)

原文地址:http://blog.csdn.net/pjk1129/article/details/6567075 在开发中,视图切换会常常遇到,有时我们不是基于导航控制器的切换,但实际开发中,有时需要做成push效果,下面将如何实现push和pop 默认动画效果代码实例:   一、push默认动画效果    CATransition *transition = [CATransition ani

2014-04-29 13:29:43 1216

原创 如何实现pushViewController:animated:的不同页面转换特效?

1. 首先要明确的是,不使用pushViewController的默认动画,所以在调用这个函数时,要将animated设置为NO.2. 使用普通的来CATransition实现转换效果,代码如下:#import #import     CATransition *animation = [CATransition animation];    [animation setDuration:0.

2014-04-29 13:29:41 459

原创 【IOS】IOS7 UI适配

昨天下了把手机升级成了IOS7 正式版,然后下了最新的xocde5.  试着编译了一下刚刚完成的几个应用,还好问题不大,半个小时的时间都适配好了,然后改了下几个新出现的warning。过几天等空了,要把IOS7的更新的特性好好看一下 http://www.cocoachina.com/newbie/basic/,记录一下。Xcode5 正式版的下载地址:http://adcdownload.app

2014-04-29 13:29:39 400

原创 获取iOS设备当前ip地址

第一种方法是用系统api的方式获取,如下#include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include "GetAddresses.h"#define min

2014-04-29 13:29:36 443

原创 如何获取ios设备的当前IP地址

#import #import - (NSString *)getIPAddress{    struct ifaddrs *interfaces = NULL;    struct ifaddrs *temp_addr = NULL;    NSString *wifiAddress = nil;    NSString *cellAddress = nil;       

2014-04-29 13:29:34 371

原创 如何获取 ios 设备的存储容量 2

#include double get_disk_capacity ( char * path){    struct statvfs sfs;    unsigned long long result = 0;    double disk_capacity = 0;        if ( statvfs ( path, &sfs) != -1 )    {       

2014-04-29 13:29:32 416

原创 如何取得硬盘空间大小

#include #include void GetDiskFreeSpaceEx(long long *freespace){        struct statfs buf;        *freespace = 0;        if(statfs("/", &buf) >= 0){                *freespace = (long lon

2014-04-29 13:29:30 460

原创 2013年09月15日

虽然App Store能够提醒用户软件更新,但很多用户不会主动去更新一大堆的软件(我机器上待更新的软件在100个左右)。如果在软件开启时提醒用户更新 或者 更多中设置“检查更新”项,效果会好很多。通常的做法是在自己的服务器上记录最新版本号,从iOS客户端请求,与本地版本号比较,不同则提示更新。这种做法简单,缺点是需要单独的服务器支持。通过查阅相关文章,找到了如下方法,与上述方法类似,不过不需要

2014-04-29 13:29:27 302

原创 iOS上的音调生成器

在这篇文章中,我会介绍一个小型iOS程序,它可以生成一个持续的固定频率的音调,该频率由一个滑动条来调节。这个程序将会展示如何简单地通过喇叭输出自己生成的声音。介绍我之前写了一篇关于播放mp3或AAC格式的音频流的文章。这些文章介绍了关于采用AudioQuerer API来播放音频。AudioQueue的接口能够提取音频数据(即使是压缩格式),之后通过外放设备播放。AudioQueue API的解码

2014-04-29 13:29:25 2073

原创 AudioSessionSetProperty用法

UInt32 allowMix = AVAudioSessionCategoryAmbient;    AVAudioSession* audioSession = [AVAudioSession sharedInstance];    [audioSession setCategory:AVAudioSessionCategoryAmbient error:nil];        Au

2014-04-29 13:29:23 864

原创 IOS6屏幕旋转详解(自动旋转、手动旋转、兼容IOS6之前系统)

概述:在iOS6之前的版本中,通常使用 shouldAutorotateToInterfaceOrientation 来单独控制某个UIViewController的方向,需要哪个viewController支持旋转,只需要重写shouldAutorotateToInterfaceOrientation方法。但是iOS 6里屏幕旋转改变了很多,之前的 shouldAutorotateToInter

2014-04-29 13:29:20 418

原创 使用UIBezierPath平滑的画线

UIBezierPath 是根据 Core Graphic Framework 写出的 Class ,能够让我们在 UIView 上画出我们需要的图形,主要就是一个UIBezierPath对象和一个UIColor对象保存画笔的颜色。@implementation SmoothDrawDoodleView@synthesize parentView;@synthesize lastImage;@sy

2014-04-29 13:29:18 1637

原创 IOS页面滑动Sample——ScrollView+PageControl

demo  http://code4app.com/ios/PageControl/4f67fddb6803fa2c63000001

2014-04-29 13:29:16 539

原创 tableview的数据载入完成的判断

-(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{if([indexPath row] == ((NSIndexPath*)[[tableView indexPathsForVisibleRows]

2014-04-29 13:29:13 2097

原创 在anyView里加badgeValue.

gitHUB   CustomBadge   https://github.com/ckteebe/CustomBadge

2014-04-29 13:29:11 449

ios libx264 静态库 .a文件

ios libx264 静态库 .a文件 支持armv7 7s 模拟器

2014-06-04

iOS openssl 静态库 .a文件

iOS openssl 静态库 .a文件 支持 armv7 armv7s 模拟器

2014-06-04

iOS g729a ,voip 语音

iOS g729a ,voip 语音, 支持armv7 armv7s

2014-06-04

空空如也

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

TA关注的人

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