- 博客(23)
- 收藏
- 关注
原创 NSLog在Release版本也会调用 - - NSAssert NSCAssert
Remember to remove or comment out NSLog calls before shipping your app, as you probably don’t want your finished app to dump lots of messages into the console.
2013-10-30 21:54:55 1660
转载 回调函数 CALLBACK
回调函数 CALLBACK回调函数就是一个通过函数指针调用的函数。如果你把函数的指针(地址)作为参数传递给另一个函数,当这个指针被用为调用它所指向的函数时,我们就说这是回调函数。回调函数不是由该函数的实现方直接调用,而是在特定的事件或条件发生时由另外的一方调用的,用于对该事件或条件进行响应。 1 函数指针回调在C语言中是通过函数指针来实现的,通过将回调函数的地址传给被调函数从而实现
2013-10-30 15:52:06 657
原创 "\xA1\xbb" 转义字符
2. 八进制转义字符它是由反斜杠'\'和随后的1~3个八进制数字构成的字符序列。例如,'\60'、'\101'、'\141'分别表示字符'0'、'A'和'a'。因为字符'0'、'A'和'a'的ASCII码的八进制值分别为60、101和141。字符集中的所有字符都可以用八进制转义字符表示。如果你愿意,可以在八进制数字前面加上一个0来表示八进制转义字符。?3. 十六进制转义字符?它
2013-10-30 10:34:57 3632
转载 char, unsigned char = BYTE; short, unsigned short = WORD; long, unsigned long = DWORD;
数据类型char , unsigned char = BYTE; short, unsigned short = WORD; long, unsigned long = DWORD; int , unginged int = UINT 在Turbo C语言中, 每个变量在使用之前必须定义其数据类型。Turbo C有以 下几种类型: 整型
2013-10-30 10:27:21 1260
原创 awakeFromNib
awakeFromNib message is sent to all nib-instantiated objects just after they are instantiated by the loading of the nib: - (void) awakeFromNib { [super awakeFromNib]; self.backgroundColo
2013-10-28 23:53:55 758
原创 Action
An action is a message emitted automatically by a Cocoa UIControl interface object (acontrol), and sent to another object, when the user does something to it, such as tapping the control. The variou
2013-10-28 23:50:14 620
原创 Outlet Collections
An outlet collection is an NSArray instance variable (in code) matched (in a nib) by multiple connections to objects of the same type.For example, suppose a class contains this property declaration:
2013-10-28 23:37:17 1618
原创 Deleting an Outlet
Deleting an outlet coherently — that is, without causing one of the problems described in the previous section — involves working in several places at once,Disconnect the outlet in the nib.Remov
2013-10-28 23:21:33 679
原创 Outlet
An outlet is something in a nib file: it’s a connection from one object in a nib file to another.For example, let’s say that we’ve made a nib where the class of Nib Object A is Dog, and let’s say
2013-10-28 19:04:31 695
转载 触发ASSERT(afxCurrentResourceHandle != NULL)错误的原因
这种错误的原因是由于要使用MFC库中的某些资源,但是MFC并没有被初始化. 这种情况多发生在atl和其它非MFC工程,后追加MFC的头文件获得了部分支持现象:1) 编译可以通过 2)有些MFC类可以使用 3) 使用CRectTracker, CMenu.LoadMenu....时出现触发ASSERT(afxCurrentResourceHandle != NULL)错误解
2013-10-28 15:02:00 994
转载 fatal error LNK1207
VC中错误:LINK : fatal error LNK1207: incompatible PDB format in "H:\例子000\Debug\main.pdb"; delete and rebuildError executing link.exe.即链接器工具错误 LNK1207“filename”中的 PDB 格式不兼容;删除并重新生成在VC6.0中 选择工
2013-10-28 15:00:58 3981
原创 Frameworks & Modules
UIKitCocoa classes that are specialized for iOS, whose names begin with “UI,” are part of the UIKit framework. The UIKit framework is imported () in the precompiled header fileFoundation
2013-10-27 22:13:44 737
原创 UIApplicationMain
int main(int argc, char *argv[]){ @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); }}
2013-10-27 21:30:42 891
转载 extern “C”
extern “C”使用extern “C”关键字实际上相当于一个编译器的开关,它可以将c++语言的函数编译为c语言的函数名称。即保持编译后的函数符号名等于源代码中的函数名称。
2013-10-25 16:50:19 497
转载 转贴 fatal error LNK1201:
OglPMesh fatal error LNK1201: 写入程序数据库“d:\OglPMesh\Debug\OglPMesh.pdb”时出错;请检查是否是磁盘空间不足、路径无效或权限不够上面的错误在 MSDN的解释如下:写入程序数据库“filename”时出错;请检查是否是磁盘空间不足、路径无效或权限不够LINK 未能写入输出文件的程序数据库 (PDB)。可能的
2013-10-25 13:27:17 1460
原创 To see an outline of a view’s subview hierarchy at runtime
To see an outline of a view’s subview hierarchy at runtime while paused in the debugger, use the debugger console to send the recursiveDescription command to that view; for example, po [someView recur
2013-10-24 22:49:45 491
原创 Displaying Alerts with UIAlertView
- (void)viewDidAppear:(BOOL)paramAnimated{ [super viewDidAppear:paramAnimated]; UIAlertView *alertView= [[UIAlertViewalloc] initWithTitle:@"Alert
2013-10-22 23:49:06 785
原创 Adding Object Subscripting Support to Your Classes
Traditionally,NSString *constkFirstNameKey =@"firstName";NSString *constkLastNameKey =@"lastName";NSMutableDictionary *dictionary= [[NSMutableDictionaryalloc] init];[dict
2013-10-22 22:51:33 700
原创 NSSet
NSSet *shoppingList= [[NSSetalloc] initWithObjects: @"Milk", @"Bananas", @"Bread", @"Milk", nil];
2013-10-22 22:06:44 638
原创 NSDictionary
NSDictionary *personInformation=@{ @"firstName" :@"Mark", @"lastName" :@"Tremonti", @"age" :@30, @"sex" :@"Male" };NSString *firstName= personInformation[@"firstName
2013-10-22 22:00:24 557
原创 NSArray
__unused NSString *firstString= stringsArray[0];NSArray *stringsArray= @[ @"String 1", @"String 2", @"Strin
2013-10-22 21:56:41 540
原创 OC 文件操作 创建和删除API
//如果"/Documents/Theme"路径不存在,则创建。if(![[NSFileManager defaultManager]fileExistsAtPath:themePath]){ [[NSFileManager defaultManager] createDirectoryAtPath:themePath attributes:nil];}//删除已
2013-10-21 17:03:55 1751
原创 OS X 获得桌面路径方法
[NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES)objectAtIndex:0];
2013-10-21 16:59:58 2909
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人