iPhone .app在 ios 模拟器上运行时,存放位置
摘要:本文摘自:http://www.cocoachina.com/ask/questions/show/53074/%E5%85%B3%E4%BA%8Eapp%E5%9C%A8ios%E6%A8%A1%E6%8B%9F%E5%99%A8%E4%B8%8A%E8%BF%90%E8%A1%8C%E6%97%B6%EF%BC%8C%E5%AD%98%E6%94%BE%E4%BD%8D%E7%BD%AE%EF%BC%9F如果是xcode3.x的话,一般是在你的代码文件夹里。4.2是在/Users/XXX/Library/Application Support/iPhone Simulator/4.3/Ap
阅读全文
posted @
2012-03-09 15:51
wtq
阅读(1968)
推荐(0)
iPhone 如何使用UIImageView播放动画,并停留在之后一张图片并添加播放结束时的事件
摘要:问题:如何使用UIImageView播放动画,并停留在之后一张图片思路:除了把动画所需要的几张图片赋值给 animationImages 之外,多加一步 ,把最后一张图片赋值给UIImageView的 Image就好了。让后就开始Animations。代码如下: UIImageView*fishAni=[[UIImageViewalloc]initWithFrame:[[UIScreenmainScreen]bounds]];//将指定的图片载入animationImagesfishAni.animationImages=[NSArrayarrayWithObjects:[UIImage...
阅读全文
posted @
2012-02-28 19:40
wtq
阅读(3416)
推荐(0)
iphone 地图:
摘要:1.利用webview 加载地图 参考地址为:WebView加载地图数据 发现问题:当加载网页时,网页的上部分不能被隐藏,当将其拉下来时,又自动往上移。2.mapkit 学习笔记3.创建地图4.iPhone Mapkit 之在地图加入坐标点5.MapKit添加坐标点2
阅读全文
posted @
2012-02-23 11:08
wtq
阅读(260)
推荐(0)
iphone 常用函数汇总
摘要:1:将字典中的键值对赋值给对象的各个成员变量。关键字:setValuesForKeysWithDictionary 1.1先定义一个类,该类为Quotation 声明如下: @interfaceQuotation:NSObject{}@property(nonatomic,retain)NSString*character;@property(nonatomic,assign)NSIntegeract;@property(nonatomic,assign)NSIntegerscene;@property(nonatomic,retain)NSString*quotation;@end@...
阅读全文
posted @
2012-02-17 11:28
wtq
阅读(484)
推荐(0)
iPhone UITableViewCell如何滚动到视图顶端。
摘要:如何让UITableViewCell滚动到视图顶端。答案如下:- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated;- (void)scrollToNearestSelectedRowAtScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated;这两个方法都可以用,第..
阅读全文
posted @
2012-02-15 12:00
wtq
阅读(9034)
推荐(0)
iphone 获取通讯录的联系人
摘要:1:原文摘自:http://www.cocoachina.com/iphonedev/sdk/2011/1130/3635.html获得通讯录中联系人的所有属性 ,看代码: ABAddressBookRef addressBook = ABAddressBookCreate();CFArrayRef results = ABAddressBookCopyArrayOfAllPeople(addressBook);for(int i = 0; i < CFArrayGetCount(results); i++){ABRecordRef person = CFArrayGetValueAtI
阅读全文
posted @
2012-02-01 08:47
wtq
阅读(1346)
推荐(0)
iphone tableview 树形结构
摘要:1tableview 树形结构 demo2 经典树形结构 demo
阅读全文
posted @
2012-01-31 11:51
wtq
阅读(385)
推荐(1)
iPhone真机调试报错 Error launching remote program: No such file or directory
摘要:iPhone真机调试报如下错误时,关掉Xcode,重新启动就可以了,注意是关掉Xcode,彻底关掉。Error launching remote program: No such file or directory一般是因为修改了 Bundle identifier 造成的。
阅读全文
posted @
2012-01-16 18:49
wtq
阅读(734)
推荐(0)
iphone 按home键退出应用程序
摘要:方法一:设置plist文件。方法二:AppDelegate里- (void)applicationDidEnterBackground:(UIApplication *)application {}在里面可以自定义做一些事,比如记录些信息,然后自己调exit退出就可以了
阅读全文
posted @
2012-01-16 16:08
wtq
阅读(959)
推荐(0)
iphone NSmutableArray内存管理
摘要:1:原文摘要:http://www.cnblogs.com/speeding/archive/2011/09/16/2178355.htmliPhone程序开发中的内存泄漏问题是新手非常头痛的事情,可能是用C#这类自动垃圾释放的语言太习惯了,用xcode中的profile工具查了一下我写的小程序,内存泄漏了一大堆,经过一阵子排查,在NSMutableArray中添加对象后不正确维护对象的引用计数是一个主要原因。在NSMutableArray how to properly addObjects and release这个讨论主题中,给出了正确的使用NSMutableArray的步骤,先看他给出
阅读全文
posted @
2012-01-11 21:37
wtq
阅读(614)
推荐(0)
iPhone Instruments工具使用
摘要:本文摘自:http://blog.chinaunix.net/link.php?url=http://fei263.blog.163.com%2Fblog%2Fstatic%2F92793724201072093050741%2F最近常使用Instruments这个工具,我发现它对追踪游戏中的内存泄露非常有帮助。自从发现Instruments如此有用后,我就觉得写一篇文章介绍如何使用它来追踪内存泄露对其他人也会有帮助。什么是内存泄露?我为什么要关心内存泄露?…此段省略…访问维基百科可以获得更多关于内存泄露的信息。我如何知道内存泄露了?一些内存泄露可以很容易地通过阅读代码来发现,另一些就要困难点
阅读全文
posted @
2012-01-11 20:43
wtq
阅读(398)
推荐(0)
iphone NSNotificationCenter
摘要:本文摘自:http://blog.sina.com.cn/s/blog_5df7dcaf0100c0q2.html第十四章: 使用 Notifications用户可能使用RaiseMan并打开了几个document, 然后他发现紫色的背景颜色实在是不利于阅读文档正文. 于是,他打开Preferencespanel修改背景颜色,不过令人失望的是,已经存在的文档的背景颜色不会跟着改变. 于是,这个用户可能会写信给你告诉你这些. 你也许会回复:"defualts会在document创建的时候才读取,保存document在打开"实际上,用户想说明的是他希望程序能立马刷新已经打开的文
阅读全文
posted @
2012-01-09 10:47
wtq
阅读(516)
推荐(0)
iphone 多线程编程
摘要:1:本文摘自:http://www.voland.com.cn/iphone-in-the-multi-threaded-programming2,多线程 :http://www.yifeiyang.net/iphone-developer-advanced-11-multiple-threads-of-use-and-precautions/3,多线程编程指南http://www.cocoachina.com/iphonedev/sdk/2011/1221/3753.html多线程在各种编程语言中都是难点,很多语言中实现起来很麻烦,objective-c虽然源于c,但其多线程编程却相当简单,
阅读全文
posted @
2012-01-04 17:09
wtq
阅读(265)
推荐(0)
【转载】 iphone使用NSOperationQueue简化多线程开发
摘要:1:原文摘自:http://disanji.net/2011/08/10/%E4%BD%BF%E7%94%A8nsoperationqueue%E7%AE%80%E5%8C%96%E5%A4%9A%E7%BA%BF%E7%A8%8B%E5%BC%80%E5%8F%91/使用NSOperationQueue简化多线程开发来自Fgamers2011年8月10日860 次阅读 评论 (0)多线程开发是一件需要特别精心的事情,即使是对有多年开发经验的工程师来说。为了能让初级开发工程师也能使用多线程,同时还要简化复杂性。各种编程工具提供了各自的办法。对于iOS来说,建议在尽可能的情况下避免直接操作线程.
阅读全文
posted @
2011-12-31 15:20
wtq
阅读(391)
推荐(0)
iphone GCDAsyncSocket 详解
摘要:1,原文摘自:https://github.com/robbiehanson/CocoaAsyncSocket/wiki/Intro_GCDAsyncSocketReading & WritingOne of the best features of the library is "queued read/write operations". What does that mean? A quick code example may explain it best:NSError *err = nil;if (![socket connectToHost:@&quo
阅读全文
posted @
2011-12-31 11:32
wtq
阅读(6284)
推荐(0)
iphone 简单的iPhone播放器
摘要:1.http://www.cnblogs.com/KidReborn/archive/2010/10/07/1845097.html-(void)openMovie:(id)sender{ NSString *path = [[NSBundle mainBundle] pathForResource:@"movie" ofType:@"m4v"]; MPMoviePlayerController *movieController = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fi
阅读全文
posted @
2011-12-29 14:12
wtq
阅读(331)
推荐(0)
iPhone NSBundle的使用
摘要:本文摘自:http://liwpk.blog.163.com/blog/static/363261702011573638250/NSBundle束,是一种特定的文件类型,其中的内容遵循特定的结构。NSBundle的一个主要作用是获取Resources文件夹中的资源。使用主束来获取需要的资源文件:NSBundle*bundle = [NSBundlemainBundle];NSString*plistPath = [bundlepathForResource:@"statedictionary"ofType:@"plist"];或者简写成一行:NSStr
阅读全文
posted @
2011-12-28 14:19
wtq
阅读(904)
推荐(0)
iphone smartsvn 下载
摘要:1,java smartSvn 下载地址1:http://bbs.weiphone.com/read-htm-tid-2275121.html下载地址2:http://jdk7.java.net/macportpreview/
阅读全文
posted @
2011-12-27 10:44
wtq
阅读(233)
推荐(0)