12 2011 档案

摘要:#import <UIKit/UIKit.h>@interface UIView (Image)- (UIImage *) imageByRenderingView;@end#import "UIView+Image.h"#include <QuartzCore/QuartzCore.h>@implementation UIView (Image)- (UIImage *)imageByRenderingView{ UIGraphicsBeginImageContext(self.bounds.size); [self.layer renderInC 阅读全文
posted @ 2011-12-30 15:12 周宏伟 阅读(628) 评论(0) 推荐(0) 编辑
摘要:Introducing SeguesIt’s time to add more view controllers to our storyboard. We’re going to create a screen that allows users to add new players to the app.Drag a Bar Button Item into the right slot of the navigation bar on the Players screen. In the Attributes Inspector change its Identifier to Add 阅读全文
posted @ 2011-12-21 15:39 周宏伟 阅读(891) 评论(0) 推荐(1) 编辑
摘要:Storyboarding is an exciting new feature in iOS 5 that will save you a lot of time building user interfaces for your apps. To show you what a storyboard is, I’ll let a picture do the talking. This is the storyboard that we will be building in this tutorial:You may not know exactly yet what the app d 阅读全文
posted @ 2011-12-21 15:37 周宏伟 阅读(906) 评论(0) 推荐(1) 编辑
摘要:iOS4引入了一个新特性,支持代码块的使用, 这将从根本上改变你的编程方式。代码块是对C语言的一个扩展,因此在Objective-C中完全支持。如果你学过Ruby,Python或Lisp编程 语言,那么你肯定知道代码块的强大之处。简单的说,你可以通过代码块封装一组代码语句并将其当作一个对象。代码块的使用是一种新的编码风格,可以让你运用 自如的使用iOS4中新增API。我们先来看两个在iOS4中使用代码块的例子(你很有可能已经见过):view animations 和enumeration使用代码块的例子 第一个例子,假设我们创建一个纸牌游戏,需要展现纸牌被派发到玩家面前的动画效果。幸运的是通过 阅读全文
posted @ 2011-12-20 14:19 周宏伟 阅读(742) 评论(0) 推荐(0) 编辑
摘要:这套教程作为初学OpneGL ES的入门教程是相当不错的,推荐给大家 OpenGL ES 从零开始系列 之一 – 基本概念OpenGL ES 从零开始系列 之二 – 简单绘图概述OpenGL ES 从零开始系列 之三 – 透视OpenGL ES 从零开始系列 之四 – 光效OpenGL ES 从零开始系列 之五 – 材质OpenGL ES 从零开始系列 之六 – 纹理及纹理映射OpenGL ES 从零开始系列 之七 – 变换和矩阵OpenGL ES从零开始系列之四补遗 – setupView重写OpenGL ES 从零开始系列08:交叉存取顶点数据OpenGL ES 从零开始系列9a:动画基础 阅读全文
posted @ 2011-12-14 21:52 周宏伟 阅读(629) 评论(0) 推荐(0) 编辑
摘要:在 xcode4中,为了将一些比较独立的功能封装起来,或者多人同时开发时,需要将程序打包成静态库,但在xcode4中设置工作区、工程和静态库等遇到了 一系列问题,不知道是不是xcode的高版本中已经解决了这些问题?我用的是xcode4.0(4A304a), SDK是4.3。从网上能够查到的写的比较全面的使用和建立静态库的文章是CarbonFive的这篇文章。但我按照这个文章逐个试验后,发现几个地方跑不通,经过一番尝试,终于在我的机器上把详细的设置步骤跑通了。xcode4中的几个基本概念工作区(Workspace):在xcode4中引入了这个概念,能够把project统一管理起来,这功能在Vis 阅读全文
posted @ 2011-12-06 16:39 周宏伟 阅读(1242) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示