摘要:LLVM是 Low Level Virtual Machine 的简称,这个库提供了与编译器相关的支持,能够进行程序语言的编译期优化、链接优化、在线编译优化、代码生成。简而言之,可以作为多种语言编译器的后台来使用。如果这样还比较抽象的话,介绍下Clang就知道了:Clang 是一个 C++ 编写、基于 LLVM、发布于 LLVM BSD 许可证下的 C/C++/Objective C/Objective C++ 编译器,其目标(之一)就是超越 GCC。Clang 开发事出有因,Wiki 介绍如下:Apple 使用 LLVM 在不支持全部 OpenGL 特性的 GPU (Intel 低端显卡)
阅读全文
11 2011 档案
摘要:在XCode 4.2 (with LLVM):里 -(void) release {} 会弹出警告warning: Semantic Issue: Conflicting distributed object modifiers on return type in implementation of 'release'为了去掉警告 修改如下-(oneway void) release { }onewayis used with the distributed objects API, which allows use of objective-c objects between
阅读全文
摘要:XCode4 App Store提交小结 本文建立在你的应用程序已开发完成的基础上 本文以理清流程为主 本文的内容以Distribution为准,但是所附的参考资料也有对Ad Hoc的说明 三种证书(Development、Distribution、Ad Hoc)的区别请参考:http://blog.sina.com.cn/s/blog_68444e230100srdn.html 本文引用的官方资料以XCode 3为准,XCode 4的操作略有不同正文 [建议:使用Safari浏览器] 准备注册App所需的材料。在这里查看。 在iTune...
阅读全文
摘要:虽说有ios5了,可是以前的系统不能抛弃啊?于是乎当你选择的sdk低于4.3时,就出现了下页的报错:warning: iPhone apps with a deployment target lower than 4.3 should include an armv6 architecture (current IPHONEOS_DEPLOYMENT_TARGET = "4.0", ARCHS = "armv7").网上找了半天,发现一个日文博客,http://sarudeki.jp/mipoiapp/?p=692,虽然看不懂,但是截图还是好理解的,算是
阅读全文
摘要:键盘的显示很方便,但是键盘比较方便的隐藏就不是那么容易了看下图1呼出了键盘后,可以在键盘的右边添加一个按钮,如果用户想隐藏键盘,就点此按钮,就可以了。但是在IOS5的情况下,中文输入法在键盘右边的按钮就会被选词区遮盖了。请看图2隐藏键盘的按钮被系统的选词区遮盖了,基于这个状况,希望用户能够点击键盘区域以外的地方也能隐藏键盘。所以如何知道用户点击键盘以为区域就显得很重要了由于在ViewController中不能捕获以下Touch事件,以下Touch主要是针对UIView的- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)even
阅读全文
摘要:UIToolBar 三种办法方法一/toolBarbackgroundimagesetbasedoniOSversion[[UIDevicecurrentDevice]systemVersion];if([[[UIDevicecurrentDevice]systemVersion]floatValue]>4.9){//iOS5UIImage*toolBarIMG=[UIImageimageNamed:@"toolBar_brown.png"];if([toolBarrespondsToSelector:@selector(setBackgroundImage:forT
阅读全文
摘要:CGContextRef context = UIGraphicsGetCurrentContext();画一个正方形图形 没有边框CGContextSetRGBFillColor(context, 0, 0.25, 0, 0.5);CGContextFillRect(context, CGRectMake(2, 2, 270, 270));CGContextStrokePath(context);写文字CGContextSetLineWidth(context, 1.0);CGContextSetRGBFillColor (context, 1, 1, 1, 1.0);UIFont *fon
阅读全文
摘要:IOS 多线程 有三种主要方法(1)NSThread(2)NSOperation(3)GCD下面简单介绍这三个方法1.NSThread 调用方法如下: 如函数需要输入参数,可从object传进去。 (1) [NSThread detachNewThreadSelector:@selector(threadInMainMethod:) toTarget:self withObject:nil]; (2) NSThread* myThread = [[NSThread alloc] initWithTarget:self selector:@selector(threadInMain...
阅读全文
摘要:解决方法如下dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ NSTimer* t = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(Reconnect:) userInfo:nil repeats:NO]; [[NSRunLoop currentRunLoop] addTimer:t forMode:NSDefaultRunLoopMode]; [[NSRun...
阅读全文