![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IOS
happytengfei
编程爱好者——小牛
展开
-
IOS MAC OS内存概念
clean memoryclean memory are memories that can be recreated, on iOS it is memory of:system frameworkbinary executable of your appmemory mapped filesAlso notice this situation: when y转载 2013-11-08 14:47:46 · 2080 阅读 · 0 评论 -
ios 内存管理(2)
这篇文章转自 http://anxonli.iteye.com/blog/1097777,集中与iOS的多核编程和内存管理,大家完全可以使用苹果的多核编程框架来写出更加responsive的应用。 多核运算 在iOS中concurrency编程的框架就是GCD(Grand Central Dispatch), GCD的使用非常简单。它把任务分派到不同的queue队列来处理。开发者转载 2012-12-05 08:08:53 · 345 阅读 · 0 评论 -
debug random crashes in your Cocoa app
source link: http://www.corbinstreehouse.com/blog/2007/10/instruments-on-leopard-how-to-debug-those-random-crashes-in-your-cocoa-app/It can easily be used to debug those “random crashers” in转载 2012-11-15 10:04:11 · 407 阅读 · 0 评论 -
debug memory release on ios
source link:http://www.cocoadev.com/index.pl?DebuggingAutoreleaseUpdate: For Leopard users, I recommend using Instruments: http://www.corbinstreehouse.com/blog/index.php/2007/10/instruments-on-leo转载 2012-11-14 18:04:03 · 678 阅读 · 0 评论 -
程序运行前显示一个logo
方法1 将Default.png添加到bundle中方法2: 使用SplashView调用:-(void)showSplash{SplashView *s = [[[SplashView alloc] initWithName: @"Burp" andAuthor:@"Sean Heber sean@spiffytech.com>"] autorelease原创 2012-10-21 11:29:20 · 426 阅读 · 0 评论 -
iPhone上创建一个SSL链接
不一定对if(secured){ [NSStream getStreamsToHost:host port:443 inputStream:&input outputStream:&output]; } [input setDelegate:self]; [output setDelegate:self]; [input sched转载 2012-10-20 21:40:10 · 1155 阅读 · 0 评论 -
让UIAlertView 自动消失
- (void) hideView: (NSTimer*)timer { [baseAlert dismissWithClickedButtonIndex:0 animated:NO]; [baseAlert release]; baseAlert =NULL; } - (void) presentSheet{ b原创 2012-10-20 21:54:13 · 371 阅读 · 0 评论 -
Target failed to run: Remote exception encountered
select “Product/Edit Scheme” from the top menu then click on the “Profile” button on the left panel. Under the “Info” tab you will see “Build configuration”, make sure “Debug” is selected.原创 2012-10-18 15:35:13 · 352 阅读 · 0 评论 -
iOS 文件和数据管理 (可能会删除本地文件储存)
转自:http://www.apple.com.cn/developer/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/FilesandNetworking/FilesandNetworking.html文件和数据管理iPhone OS系统上的文件和用户的媒体数据及个人文件共享闪存上的转载 2012-09-24 13:26:00 · 6677 阅读 · 0 评论 -
跨平台移动应用开发框架的探索——PhoneGap
转自:http://www.csdn.net/article/2011-11-28/308217跨平台移动应用开发框架的探索——PhoneGap发表于11-28 15:32| 4760次阅读| 来源整理自IBM dW社区| 9 条评论| 作者柏越、黄彦军、吕双涛web服务开发框架web开发框架跨平台摘要:本文通过介绍移动互联网的发展,引出了跨转载 2012-09-24 09:26:08 · 1545 阅读 · 0 评论 -
iOS中对文件的操作 (NSSearchPathForDirectoriesInDomains)
转自:Orand's Blog — 平凡的思考iOS中NSSearchPathForDirectoriesInDomains函数iOS中NSSearchPathForDirectoriesInDomains函数参数 NSDocumentDirectory, NSDocumentationDirectory, NSDownloadsDirectory的意义刚学转载 2012-09-24 10:42:51 · 16110 阅读 · 0 评论 -
ios 内存管理(1)
原始链接http://vinceyuan.cnblogs.com/ 此文涉及的内存管理是针对于继承于NSObject的Class。一 基本原理Objective-C的内存管理机制与.Net/Java那种全自动的垃圾回收机制是不同的,它本质上还是C语言中的手动管理方式,只不过稍微加了一些自动方法。1 Objective-C的对象生成于堆之上,生成之后,需要一个转载 2012-12-05 08:00:00 · 341 阅读 · 0 评论 -
Object-C 类,对象,运行时,isa
如果不是Apple,不是App Store,Object-C恐怕早就淡出人们的视线了。大部分编程语言都是基于C语法风格的,所以初次接触这个非C风格的语言,会看不懂它那怪异的语法。但如果掌握了它之后,也并不会觉得它又太多的不同。今天记录一下它的底层运作。 1: 类Class: typedef struct objc_class * Class; 从Clas转载 2012-12-25 16:27:16 · 521 阅读 · 0 评论 -
iOS开源项目和开源网址
参考网站:1 www.oschina.net 2 www.lanrenios.com 3 www.cocoachina.com 4 https://github.com ASIHttpRequestRegexKitJSONKitFMDBBBCustomBackButtonViewController MTStat原创 2013-06-13 10:22:24 · 629 阅读 · 0 评论 -
NSString && NSMutableString 常见用法
--实例化方法-------------- NSString *str = [[NSString alloc] init]; NSString *str = [[[NSString alloc] init] autorelease]; 注意:在NSString 中存在自己的实例化和初始化的方法 例如: NSString *str1 = [NSString stringWit转载 2013-09-09 19:19:12 · 702 阅读 · 0 评论 -
detachNewThreadSelector 带参数
1 intint item = 5; id number = [NSNumber numberWithInt:item];[NSThread detachNewThreadSelector:@selector(startTask:) toTarget:self withObject:number ];(void)startTask:(id) item{原创 2013-09-09 13:08:11 · 1578 阅读 · 0 评论 -
id ,NSObject, id<NSObject>区别
我们经常会混淆以下三种申明(我是没有留意过): 1. id foo1; 2. NSObject *foo2; 3. id foo3; 第一种是最常用的,它简单地申明了指向对象的指针,没有给编译器任何类型信息,因此,编译器不会做类型检查。但也因为是这样,你可以发送任何信息给id类型的对象。这就是为什么+alloc返回id类型,但调用[[Foo alloc]转载 2013-09-09 12:50:55 · 2705 阅读 · 0 评论 -
ios升级后遇到的问题
1 升级到xcode 4.6, simulator 6.1 之后,simulator上看不到home键了在开发的时候,有时候需要认为kill后台app, 这时需要双击home键查看后台app, 如果看不到home键岂不是悲剧了。临时解决办法:按住: shift+commend 双击h.HOME 键 是 shift+commend+h2 如何强制关机IPhone 5 device原创 2013-02-20 17:05:13 · 621 阅读 · 0 评论 -
LLDB命令 以及相对应的GDB的命令
执行类命令集LLDBGDBLaunch a process no arguments.(lldb) process launch(lldb) run(lldb) r(gdb) run(gdb) rLaunch a process with arguments .(lldb) pr转载 2013-02-27 09:25:34 · 2212 阅读 · 0 评论 -
NSFileHandle 大数据量读写操作
code as bellow:1 how to write large data to a fileNSBundle *mainBundle = [NSBundle mainBundle]; NSString *txtPath = [mainBundle pathForResource:@"output" ofType:@"rtf"]; NSFileMana原创 2013-01-23 12:38:52 · 1248 阅读 · 0 评论 -
release和retainCount
retainCount昨天本来想为了讲obj-c的内存管理时,做一个简单的例子。开命令行,写obj-c文件,make,代码很简单:?1234567891011121314#import int main(int argc, char* argv) {转载 2013-01-06 20:30:56 · 369 阅读 · 0 评论 -
Delegation or Notification
Is it generally considered best practise to reduce the coupling or dependencies between classes in your application. A key benefit is that your code becomes easier to maintain since a change in one cl转载 2013-01-06 21:11:42 · 371 阅读 · 0 评论 -
UIViewController生命周期
在UIViewController中,controller的view存在两个循环:加载和卸载循环,可参考下图:加载循环程序请求controller的view如果view在内存中,则直接加载。相反,如果不存在,则UIViewController调用loadView方法loadView方法执行如下操作:如果你重载了这个方法,则必须创建必要的view并且将转载 2013-01-04 14:44:15 · 1032 阅读 · 0 评论 -
ios 目录 & 备份
[1] 一些重要的 app 目录 Application_Home>/AppName.app 这个是存放 app bundle 文件的目录,不要往这个目录中写入其他内容。在 iOS2.1 之后 ituns 同步时不会备份这个目录。ituns 在第一从 app store 购买应用并安装时会做一次同步备份,之后的同步不会备份。 Application_Home>转载 2012-09-24 10:12:09 · 1543 阅读 · 0 评论 -
Application_Home/Library/Caches
One of the more significant new features included in Apple's iOS 5 release is iCloud. iCloud is your "hard drive in the sky" that keeps your devices in sync, and also serves as a backup mechanism.转载 2012-09-24 10:09:15 · 1686 阅读 · 0 评论 -
在Mac上搭建Titanium的iOS开发环境
转自:http://soft.ccw.com.cn/htm2012/20120217_961202.shtml需求 开发基本的 Titanium iOS App 需要先准备以下几样东西: 可以执行 Mac OS 的机器 (例如 MacBook Pro/Air 等) 。 一组 Apple ID 。 iOS 仿真器,这个要从 Xcode 3.转载 2012-09-24 09:05:33 · 560 阅读 · 0 评论 -
ios open source project
转自:http://ihuby.info/2011/08/03/%E6%9C%80%E8%BF%91%E5%87%A0%E4%B8%AA%E5%80%BC%E5%BE%97%E5%85%B3%E6%B3%A8%E7%9A%84-ios-%E7%9B%B8%E5%85%B3%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE/TWUIhttps://git转载 2012-08-23 09:00:33 · 867 阅读 · 0 评论 -
内存映射(mmap) 介绍 (三)
mmap注意点:转自:http://stackoverflow.com/questions/8411709/memory-mapped-i-oI wrote a code for writing the content to the mapped buffer which mapped by using the mmap() system call. After I did some转载 2012-08-31 08:45:03 · 965 阅读 · 0 评论 -
内存映射(mmap) 介绍 (二)
具体例子:1 写大文件 :转自:http://hi.baidu.com/ah__fu/item/f09121dd35b2c7db241f4057//写入200MB数据耗时0.688s/*测试大数据写入的性能 test_mmap.cpp 使用内存映射文件来写入文件*/#include #include #include #include #include转载 2012-08-31 08:38:42 · 664 阅读 · 0 评论 -
内存映射(mmap) 介绍 (一)
转自:http://www.makelinux.net/alp/037 5.3 Mapped MemoryMapped memory permits different processes to communicate via a shared file. Although you can think of mapped memory as using a shared memor转载 2012-08-31 08:35:11 · 646 阅读 · 0 评论 -
xcode4的环境变量,Build Settings参数,workspace及联编设置
转自:http://www.cnblogs.com/xiaodao/archive/2012/03/28/2422091.html一、xcode4中的环境变量$(BUILT_PRODUCTS_DIR)build成功后的,最终产品路径--可以在Build Settings参数的Per-configuration Build Products Path项里设置转载 2012-08-29 09:38:31 · 571 阅读 · 0 评论 -
@property 参数大全
以下内容来自:http://blog.sina.com.cn/s/blog_7a2ffd5c0100uquw.html参数包括 1,getter=getterName,setter=setterName,设置setter与getter的方法名,除非你想自己取名,否则一般使用默认的名字即可。以免造成混乱。 2,readwrite,readonly (只生成getter方法),转载 2012-07-20 15:39:25 · 1191 阅读 · 0 评论 -
storyboard非常值得一看的文章
转自:http://www.iteye.com/topic/1122979http://www.iteye.com/topic/1122984转载 2012-07-20 18:50:46 · 395 阅读 · 0 评论 -
NSRunLoop 概述和原理
来自:http://www.cocoachina.com/bbs/read.php?tid=1080671.什么是NSRunLoop?我们会经常看到这样的代码:- (IBAction)start:(id)sender{pageStillLoading = YES;[NSThread detachNewThreadSelector:@selector(lo转载 2012-07-18 11:30:03 · 812 阅读 · 0 评论 -
IOS CString 与 WString
1 定义宽字符串String, 用来处理wchartypedef std::basic_string, Allocator > WString;2 定义多字节String, 用来处理chartypedef string CString原创 2012-07-03 17:33:08 · 553 阅读 · 0 评论 -
在iOS中如何使用汇编语言
转自:http://www.cnblogs.com/zenny-chen/archive/2011/10/31/2229731.html本文将系统地介绍如何利用XCode在iOS设备上使用汇编语言。一、创建汇编源文件:在你的XCode项目中存放源文件的目录下鼠标(或触控板)右键,选择New File。然后在左侧的iOS那栏里选择Other,在右边你会看到转载 2012-07-13 09:57:11 · 1366 阅读 · 0 评论 -
Best Practices for iOS Software Design
转自: https://github.com/jverkoey/iOS-Best-PracticesThis article's goal is to help you write stable code for your iOS applications. I highly encourage you to contribute your own best pract转载 2012-08-23 13:50:48 · 321 阅读 · 0 评论 -
Add Nimbus to your project
转自: http://wiki.nimbuskit.info/Add-Nimbus-to-your-projectAdd Nimbus to your projectThis tutorial will show you how to add the Nimbus framework to your project. No previous knowledge of转载 2012-08-23 10:19:34 · 643 阅读 · 0 评论 -
XCode debug 常用命令
命 令 解释 break NUM 在指定的行上设置断点。 bt 显 示所有的调用栈帧。该命令可用来显示函数的调用顺序。 clear 删 除设置在特定源文件、特定行上的断点。其用法为:clear FILENAME:NUM。 c转载 2012-10-11 15:24:39 · 787 阅读 · 0 评论 -
NSDate常用代码范例
NSDate常用代码范例 NSDate类用于保存时间值,同时提供了一些方法来处理一些基于秒级别时差(Time Interval)运算和日期之间的早晚比较等。 1. 创建或初始化可用以下方法用于创建NSDate实例的类方法有+ (id)date;返回当前时间+ (id)dateWithTimeIntervalSinceNow:(NSTimeInter转载 2012-10-10 17:25:50 · 529 阅读 · 0 评论