上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 57 下一页
  2011年12月7日
摘要: 原文摘自:http://www.apple.com.cn/developer/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AudioandVideoTechnologies/AudioandVideoTechnologies.html#//apple_ref/doc/uid/TP40007072-CH19-SW39 阅读全文
posted @ 2011-12-07 14:04 wtq 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1,使用数组遍历某一文件夹中的图片,代码如下: NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSLog(@"%d",[paths count]); NSError *error = nil; NS 阅读全文
posted @ 2011-12-07 13:41 wtq 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 1利用FileManage来读取document的文件NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSError *error = nil; NSArray *fileList = [[NSArray alloc.. 阅读全文
posted @ 2011-12-07 11:28 wtq 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 1.保存图片到document目录下:代码如下:View Code2.从document目录下显示显示图片代码如下:View Code 阅读全文
posted @ 2011-12-07 10:24 wtq 阅读(544) 评论(0) 推荐(0) 编辑
摘要: 1原文摘自:http://ruixiazun.blog.163.com/blog/static/906879182011229112144105/在开发iPhone程序时,有时候要对文件进行一些操作。而获取某一个目录中的所有文件列表,是基本操作之一。通过下面这段代码,就可以获取一个目录内的文件及文件夹列表。NSFileManager *fileManager = [NSFileManager defaultManager];//在这里获取应用程序Documents文件夹里的文件及文件夹列表 NSArray *documentPaths = NSSearchPathForDirectoriesI 阅读全文
posted @ 2011-12-07 08:56 wtq 阅读(628) 评论(0) 推荐(0) 编辑
摘要: 1:原文摘自:http://www.cocoachina.com/bbs/read.php?tid=32931我在Documents文件中建了一个文件夹fileName, 文件夹保存的有一张图片.我想读出来并在UIImageView中显示,这如何实现呢?下面是我写的代码,不知道哪出问题了??#import <UIKit/UIKit.h>@interfaceUIView{UIImageView *image;}@property (nonatomic, retain) IBOutlet UIImageView *image;@end@implementationNSFileManag 阅读全文
posted @ 2011-12-07 08:55 wtq 阅读(1026) 评论(0) 推荐(0) 编辑
摘要: 1.本文摘自:http://mobile.51cto.com/iphone-278789.htmiPhone应用AVAudioPlayer播放音频讲解是本文要介绍的内容,iPhone是媒体大师,其内建的iPod功能可轻松的处理音频和视频,下面我将对AVAudioPlayer这个音频播放类详细的介绍。使用AVAudioPlayer可以实现载入、播放、暂停、停止音频,监控平均和峰值音量水平.AVAudioPlayer处理音频中断当用户在音频回放期间受到电话时,音频会消失,出现这种情况时AVAudioPlayer委托接受audioPlayerBeginInterruption:回调,音频会话暂时无效 阅读全文
posted @ 2011-12-07 08:37 wtq 阅读(587) 评论(0) 推荐(0) 编辑
  2011年12月6日
摘要: 1原文摘自:http://mobile.51cto.com/iphone-284840.htmiPhone开发应用中案例实现举例是本文要介绍的内容,主要是来学习以下小案例的实现过程,来看详细内容。一、从 iPhone/iPad 图片库中读取图片的代码如果您的App涉及到从iPhone/iPad图片库读取图片,不妨看看CocoaChina版主“angellixf”分享的代码,会为您节省很多时间。UIImagePickerController*picker=[[UIImagePickerControlleralloc]init]; picker.delegate=self; picker.sour 阅读全文
posted @ 2011-12-06 22:09 wtq 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1:原文摘自:http://mobile.51cto.com/iphone-281558.htmiPhone开发点滴是本文要介绍的内容,主要介绍的是iphone开发中常用的一些小实例,在这作为一个小备忘来学习。先来看详细内容。iPhone中图片的拉伸/圆角处理(Image round corner, aspect fit)图片圆角 image round corner:m_mainImgView.layer.cornerRadius=6; m_mainImgView.layer.masksToBounds=YES;自动适应,保持图片宽高比 aspect fit:m_mainImgView.co 阅读全文
posted @ 2011-12-06 22:07 wtq 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1:原文摘自:http://mobile.51cto.com/iphone-284865.htmiPhone开发中为UINavigationBar设置背景图片方法是本文要介绍的内容,在iPhone开发中, 有时候我们想给导航条添加背景图片, 实现多样化的导航条效果, 用其他方法往往无法达到理想的效果, 经过网上搜索及多次实验, 确定如下最佳实现方案。为UINavigatonBar增加如下Category:@implementationUINavigationBar(CustomImage) -(void)drawRect:(CGRect)rect{ UIImage*image=[UIImage 阅读全文
posted @ 2011-12-06 22:06 wtq 阅读(292) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 57 下一页