摘要:
转自:http://marshal.easymorse.com/tech/objc-%e6%ba%90%e6%96%87%e4%bb%b6%e7%9a%84%e7%bb%84%e7%bb%87最简单的ObjC程序,你都可以这样写:#import <Foundation/Foundation.h>@interface Book : NSObject{ }-(NSString *) getPrice;@end@implementation Book-(NSString *) getPrice{ return @"$17"; }@endint main (int ar 阅读全文
摘要:
转自:http://blog.csdn.net/xialibing103/article/details/85133121.NSString转化为UNICODE String:(NSString*)fname = @“Test”;char fnameStr[10];memcpy(fnameStr, [fname cStringUsingEncoding:NSUnicodeStringEncoding], 2*([fname length]));与strcpy相比,memcpy并不是遇到'\0'就结束,而是一定会拷贝完n个字节2.NSString 转化为 char *NSStri 阅读全文
摘要:
转自:http://www.xue5.com/Mobile/iOS/661674.html如何将C++和Object-C混合编程开发IOS软件(Object-c调用C++)原文网址:http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/o*****lusPlus.htmlUsing C++ With Objective-C苹果的Objective-C编译器允许用户在同一个源文件里自由地混合使用C++和Objective-C,混编后的语言叫Objective-C++ 阅读全文