
ios
文章平均质量分 72
iteye_7030
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
__bridge,__bridge_retained和__bridge_transfer的意思,区别与使用 20 三
使用ARC能帮我们减轻不少内存管理方面的负担,尤其是对用惯了Java的程序员来说。但是像我这种Java基础本身就不牢固,做了两年的iOS已经习惯手动管理内存的半吊子,使用ARC还是经常碰壁。最近碰到了CFObject和NSObject转换的问题,由于ARC不能管理Core Foundation Object的生命周期,所以在Core Foundation和ARC之间,我们需要使用到__b...原创 2012-12-24 01:41:50 · 168 阅读 · 0 评论 -
ios 声音合成
http://stackoverflow.com/questions/7656512/combining-two-caf-files-on-iphone http://stackoverflow.com/questions/2067267/where-to-start-with-audio-synthesis-on-iphone http://stackoverflow.com...原创 2013-08-18 13:20:13 · 497 阅读 · 0 评论 -
NSInvocation简单使用
(转自)http://www.dev3g.com/?p=36 在 iOS中可以直接调用 某个对象的消息 方式有2中一种是performSelector:withObject:再一种就是NSInvocation第一种方式比较简单,能完成简单的调用。但是对于>2个的参数或者有返回值的处理,那就需要做些额外工作才能搞定。那么在这种情况下,我们就可以使用NSInvocati...原创 2012-06-13 23:47:50 · 118 阅读 · 0 评论 -
Creating an iPhone Daemon – Part 5
Creating an iPhone Daemon – Part 5Author :admin Category : Chris Alvares, Programming 26 Jun | 47 CommentsThis is part five of the blog series “Creating an iPhone Daemon”, for part ...原创 2012-09-02 15:29:15 · 124 阅读 · 0 评论 -
Creating an iPhone Daemon – Part 4
Creating an iPhone Daemon – Part 4Author :admin Category : Chris Alvares, Programming 25 Mar | 10 CommentsThis is part four of the blog series “Creating an iPhone Daemon”, for part ...原创 2012-09-02 15:28:19 · 160 阅读 · 0 评论 -
Creating an iPhone Daemon – Part 3
This is part three of the blog series “Creating an iPhone Daemon”, for part one please click this linkIn the last part of the series, we created the header file for our DLocationDelegate class, n...原创 2012-09-02 15:25:32 · 166 阅读 · 0 评论 -
Creating an iPhone Daemon – Part 2
Here is part two of the blog series “Creating an iPhone Daemon”, for part one please click this linkAs I said in part 1, we will be creating the DLocationDelegate class.With most daemons, you do ...原创 2012-09-02 15:24:29 · 128 阅读 · 0 评论 -
Creating an iPhone Daemon – Part 1
So I thought I would start this blog of with a BANG!, and show people how to create an iPhone Daemon.A daemon is a program or application that runs in the background on the device. This differs f...原创 2012-09-02 15:23:08 · 208 阅读 · 0 评论 -
iPhone数据库结构
(转)http://wuhongsheng.com/mac/2007/10/iphone-database-structure//** iphone database structure* @author zye* @contact zye@tudou.com* @update 20070924* @version 0.1* @url http://yegq.yeax.com/?p=16...原创 2012-08-31 18:57:50 · 200 阅读 · 0 评论 -
ios quartz 画图
画实心椭圆 CGRect textCountRect = CGRectMake(self.frame.size.width - size.width-10, 22, size.width, size.height); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSave...原创 2012-08-29 17:11:46 · 111 阅读 · 0 评论 -
Five Tips for Creating Stylish UIButtons
Project PreviewProject SetupIn the download that accompanies this tutorial, you’ll find folders entitled “Initial Build” and “Final Build”. Rather than showing all the steps necessary to set...原创 2012-08-26 16:11:56 · 159 阅读 · 0 评论 -
xcode 查看SQL语句的真面目
来看看SQL语句的真面目 (转自)http://765i.cn/?cat=4 我不知道你怎么想的,但是我个人喜欢看到每个语句后面的SQL语句,以确定这个程序正在按照我想的方式前进。 Apple提供了一个这样做的简便的方法,看下图,在Edit Scheme中选择Run,之后进入Arguments标签,加入下面的语句:“-com.apple.CoreData.SQLDebug 1...原创 2012-08-26 15:59:52 · 274 阅读 · 0 评论 -
在iPhone中使用AudioQueue实现音频播放
(转)http://blog.chinaunix.net/uid-25788167-id-366155.htmlAudioQueue是Mac OS X与iPhone中提供录音、播放功能的高级框架,比AudioUnit等框架更方便,而且不要求掌握更多专门的知识。从AudioQueue的名称就可以看出,AudioQueue框架以队列的形式处理音频数据。因此使用时需要给队列分配缓存空间,由...原创 2012-08-17 17:18:16 · 263 阅读 · 0 评论 -
音频后台 不中断ipod
最近做音频合成,看了百度很多的音频后台,但不是自己想要的效果.于是google加官方文档,实现了自己想要的东西.特此记录一下.与有同需求的朋友分享一下.目的功能主要是音频能后台 程序启动不中断ipod能与ipod混音转载请保留出处:http://blog.youkuaiyun.com/fightper/article/details/7516876关键代码: AudioSessi...原创 2012-08-16 14:02:06 · 148 阅读 · 0 评论 -
在新线程中使用NSTimer
转自 http://blog.youkuaiyun.com/sjzsp/article/details/6947591方法一:-(void) viewDidLoad{[self performSelectorInBackground:@selector(call1) withObject:nil]; }-(void) call1{timer1 = [NSTimer scheduledTimerW...原创 2012-10-11 18:21:53 · 116 阅读 · 0 评论 -
IPHONE GIF 播放的方式
转 http://blog.youkuaiyun.com/zltianhen/article/details/68414661.UIWebView 播放(无法控制周期).h [cpp] view plaincopy@interface webViewController : UIViewController { IBOutlet UIWebVie...原创 2012-10-11 18:30:21 · 142 阅读 · 0 评论 -
CAAnimation
CAAnimation采用了CAMediaTiming协议,可以调整时间,包括持续时间,速度,重复次数;采用了CAAction协议,可以通过响应动作的方式来显示动画.CAAnimation的一些派生类:CATransition 提供渐变效果:(推拉push效果,消退fade效果,揭开reveal效果)CAAnimationGroup 允许多个动画同时播放CABasicAnimati...原创 2012-12-23 01:09:39 · 168 阅读 · 0 评论 -
UIViewAnimation动画与Core Animation的CATransition类动画
使用UIView类函数实现://UIViewAnimationTransitionFlipFromLeft, 向左转动//UIViewAnimationTransitionFlipFromRight, 向右转动//UIViewAnimationTransitionCurlUp, 向上翻动//UIViewAnimationTransitionCurlDown, 向下翻动[UIView beginAn...原创 2012-12-23 01:06:26 · 177 阅读 · 0 评论 -
GCD实战2:资源竞争
转自http://www.dreamingwish.com/dream-2012/gcd%E5%AE%9E%E6%88%982%EF%BC%9A%E8%B5%84%E6%BA%90%E7%AB%9E%E4%BA%89.html概述我将分四步来带大家研究研究程序的并发计算。第一步是基本的串行程序,然后使用GCD把它并行计算化。如果你想顺着步骤来尝试这些程序的话,可以下载源码。注意,别运...原创 2012-12-23 01:04:27 · 160 阅读 · 0 评论 -
GCD实战一:使用串行队列实现简单的预加载
转自 http://www.dreamingwish.com/dream-2012/gcd%E5%AE%9E%E6%88%98%E4%B8%80%EF%BC%9A%E4%BD%BF%E7%94%A8%E4%B8%B2%E8%A1%8C%E9%98%9F%E5%88%97%E5%AE%9E%E7%8E%B0%E7%AE%80%E5%8D%95%E7%9A%84%E9%A2%84%E5%8A%A...原创 2012-12-22 17:10:58 · 130 阅读 · 0 评论 -
GCD介绍(四): 完结
转自 http://www.dreamingwish.com/dream-2012/gcd-four-the-the-odds-and-ends.htmlDispatch Queue挂起dispatch queue可以被挂起和恢复。使用 dispatch_suspend函数来挂起,使用 dispatch_resume 函数来恢复。这两个函数的行为是如你所愿的。另外,这两个还是也可以...原创 2012-12-22 17:08:40 · 117 阅读 · 0 评论 -
GCD介绍(三): Dispatch Sources
转自 http://www.dreamingwish.com/dream-2012/gcd%E4%BB%8B%E7%BB%8D%EF%BC%88%E4%B8%89%EF%BC%89-dispatch-sources.html 何为Dispatch Sources简单来说,dispatch source是一个监视某些类型事件的对象。当这些事件发生时,它自动将一个block放入一个d...原创 2012-12-22 17:07:16 · 143 阅读 · 0 评论 -
GCD介绍(二): 多核心的性能
转自http://www.dreamingwish.com/dream-2012/of-of-of-performance-of-of-of-of-of-of-of-gcd-introduced-ba-the-multi-core.html概念为了在单一进程中充分发挥多核的优势,我们有必要使用多线程技术(我们没必要去提多进程,这玩意儿和GCD没关系)。在低层,GCD全局dispatc...原创 2012-12-22 17:05:14 · 138 阅读 · 0 评论 -
基本概念和Dispatch Queue
转自 http://www.dreamingwish.com/dream-2012/of-of-of-of-gcd-introduced-1-basic-concepts-in-and-the-dispatch-queue.html什么是GCD?Grand Central Dispatch或者GCD,是一套低层API,提供了一种新的方法来进行并发程序编写。从基本功能上讲,GCD有点像...原创 2012-12-22 17:03:16 · 132 阅读 · 0 评论 -
Best Audio Format for iPhone Audio Programming
I had never done audio programming before I started my iPhone programming. After starting iPhone programming, I started to learn CoreAudio Framework, Audio Unit for Mac OS X system and iPhone S...原创 2012-12-19 16:26:17 · 171 阅读 · 0 评论 -
LAME 是一个开源的MP3解码编码工具
MP3 Encoding* 编码MP3文件必须按如下顺序使用LAME API1. [Optional] 如果对lame版本感兴趣,使用get_lame_version()获得。2. [Optional] 设置lame的输出函数errorf(),debugf(),msgf()。3. [Required] lame_global_flags* lam...原创 2012-12-19 13:09:35 · 1694 阅读 · 1 评论 -
iphone 调试设置
当调试程序时,程序突然崩溃,默认条件下,XCode反馈的信息不够多。可以通过以下方式让XCode反馈足够多的信息。在Edit–>Scheme里面 找到ArgumentsNSAutoreleaseFreedObjectCheckEnabledNSZombieEnabledNSDebugEnabledNSZombieEnabled MallocStackLoggin...原创 2012-06-19 15:14:25 · 117 阅读 · 0 评论 -
sqlite3中的数据类型
(转)http://www.cnblogs.com/kfqcome/archive/2011/06/27/2137000.html sqlite3中的数据类型大多数的数据库引擎(到现在据我们所知的除了sqlite的每个sql数据库引擎)都使用静态的、刚性的类型,使用静态类型,数据的类型就由它的容器决定,这个容器是这个指被存放的特定列。Sqlite使用一个更一般的动态类型系统,s...原创 2012-12-10 21:37:18 · 135 阅读 · 0 评论 -
ios随机数,and()、random()、arc4random()
原文:http://bj007.blog.51cto.com/1701577/544006我的摘要:1、iphone有几个内嵌的随机数发生器,如rand()、random()、arc4random()其精确程度为arc4random() > random() > rand()可以由其原型进行推断 int rand();long random...原创 2012-11-15 11:06:50 · 195 阅读 · 0 评论 -
自动调整UITextView/UILabel的高度height
(转自) http://tangchuanyao.com/20120507760/ | 一路向前很多时候都需要依据用户输入的内容自动调整UILabel/UITextView的高度和宽度,特别是UINavigationController的标题,超过一行的时候默认就是「…」我们希望他能换行表示,这样就需要根据内容调整titleView的高度啦。直接贴sample代码,高度和宽度可以根据自己...原创 2012-08-05 01:05:44 · 145 阅读 · 0 评论 -
(转)iphone中Grid控件实现思路、代码
(转自)http://www.devdiv.com/home.php?mod=space&uid=1&do=blog&id=2125最近论坛上网友wxy1978125一直在问iphone中Grid问题,并且从网上下载了一个例子。例子功能很强大,还可以滚动,唯一可惜的是数据只能放在一列上。原理:这里我来说说它的实现原理,其实并不复杂,简单的说就是多个view排列出来的。最...原创 2012-07-30 14:42:18 · 194 阅读 · 0 评论 -
IOS开源项目汇总
前几天看到一位会员,总结了一些开源的IOS项目,我结合自己开发过程中用到的一些开源项目,与大家分享。扫描wifi信息:http://code.google.com/p/uwecaugmentedrealityproject/http://code.google.com/p/iphone-wireless/条形码扫描:http://zbar.sourceforge.net/i...原创 2011-08-18 16:27:08 · 127 阅读 · 0 评论 -
iPhone HTTP获得XML并使用GDataXML解析
NSURL *url = [NSURL URLWithString: @"http://www.raywenderlich.com/downloads/Party.xml"]; NSMutableURLRequest* request = [NSMutableURLRequest new]; [request setURL:url]; ...原创 2011-08-16 16:46:12 · 97 阅读 · 0 评论 -
ASIHTTPRequest 详解
ASIHTTPRequest 是一款极其强劲的 HTTP 访问开源项目。让简单的 API 完成复杂的功能,如:异步请求,队列请求,GZIP 压缩,缓存,断点续传,进度跟踪,上传文件,HTTP 认证。在新的版本中,还加入了 Objective-C 闭包 Block 的支持,让我们的代码加轻简灵活。 下面就举例说明它的 API 用法。发起一个同步请求 同步意为着线...原创 2011-08-16 14:33:29 · 76 阅读 · 0 评论 -
iPhone开发之ASIHTTPRequest
强大的HTTP包装开源项目ASIHTTPRequest介绍 ASIHTTPRequest 是一个直接在CFNetwork上做的开源项目,提供了一个比官方更方便更强大的HTTP网络传输的封装。它的特色功能如下: 1,下载的数据直接保存到内存或文件系统里 2,提供直接提交(HTTP POST)文件的API 3,可以直接访问与修改HTTP请求与响应HEADER 4,轻松获取上传与...原创 2011-08-16 14:32:13 · 121 阅读 · 0 评论 -
IPhone之ASINetworkQueue 异步队列
使用NSOperationQueue(或ASINetWorkQueue,见下面示例)将给你对异步request更多的控制。当使用队列的时候,只有确定数量的request可以同时运行。如果你添加的request超过了队列的maxConcurrentOperationCount属性,request将在其他request运行完了之后运行。 注:ASINetworkQueue 类查看...原创 2011-08-16 14:30:56 · 202 阅读 · 0 评论 -
【引用】KVO(NSKeyValueObserving)、KVC(NSKeyValueCoding)作用浅谈
在很多时候接触到很多地方都有对KVC,KVO的描述,但是都是一笔带过.只知道这是Object-C提供的一个不错的机制,可以很好的减少浇水代码。 其实KVC、KVO即NSKeyValueCoding和NSKeyValueCoding的简称。 在官方文档中描述为 那我们KVO、KVC用来做什么的我们又怎么使用它呢? 首先我们先了解下KVO的机制 KVO:当指定的对象的属性被修改...原创 2011-08-16 14:17:32 · 166 阅读 · 0 评论 -
iPhone的App的目录结构
iPhone的App的目录结构如下: 对于一个运行在iPhone得app,它只能访问自己根目录下得一些文件(所谓sandbox). 一个app发布到iPhone上后,它得目录结构如下: 1、其中得app root可以用 NSHomeDirectory() 访问到;2、Documents 目录就是我们可以用来写入并保存文件得地方,一般可通过: NSAr...原创 2011-08-16 14:00:38 · 412 阅读 · 0 评论 -
ios捕获异常
@try { Statements } @catch (NSException *ex) { UIAlertView *alert = [[UIAlertView alloc] i...原创 2011-08-16 13:48:22 · 93 阅读 · 0 评论 -
Apple内部对MKUserLocation去除偏移的方法。
找到Apple内部对MKUserLocation去除偏移的方法。 [MKLocationManager _applyChinaLocationShift:(CLLocation*)arg] 这个方法返回去除偏移后的CLLocation*。 Code: @interface MKLocationManager - (CLLocation*)_applyChinaLocationSh...原创 2011-08-16 13:43:09 · 137 阅读 · 0 评论