摘要: @synthesize statusText;This is how we tell the compiler to automatically create the accessor and mutator methods for us.two invisible methods in out class:statusText setStatusText: but they are there nonetheless waiting for use them.when either button is tapped-(IBAction)buttonPressed: (id)sender {. 阅读全文
posted @ 2012-09-07 08:37 顺武 阅读(243) 评论(0) 推荐(0) 编辑
摘要: The iPhone SDK helps you craft user interfaces.the visual classes you'll work with and discuss their roles in the interface design.You read about controllers that work with these visual classes and discover how the handle tasks like device reorientation.laying out and customizing interface.both 阅读全文
posted @ 2012-08-24 08:33 顺武 阅读(177) 评论(0) 推荐(0) 编辑
摘要: user interacton in the iosThe Model-View-Control ParadigmThe designers of Cocoa touch was guided by a concept called MVC, few are as true to the MVC model as cocoa touch. 阅读全文
posted @ 2012-08-24 08:18 顺武 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 可以认为Objective -C 是另一个版本的C++,也就是它彩了与c++不同的语法,但也实现了面向对象。NextStep 是一个使用Objective-c语言编写的功能强大的工具包,里面有大量的类库,结构体等,被苹果收购后,更名为Cocoa,但没有改类库的名称,因此有很多以NS为前缀的类名,结构体,枚举等。在Objective-C中使用前缀可以有效防止名称冲突。Cocoa 框架由Foundation Kit\ App kit 两 部分组成,前者是基础工具库,是你必须首先要学会的,后者主要是UI库\高级对象等,类定义:在objective-c中必须先定义一个接口,该接口用于描述这个类的组成, 阅读全文
posted @ 2012-08-18 15:17 顺武 阅读(1179) 评论(0) 推荐(0) 编辑
摘要: 复合使用复合可组合多个对象,使之人工协作。会同时使用继和复合来创建自己的类。编程中的复合就好像音乐中的作曲一样;将多个组件组合在一起配合使用。在Objective-C中,复合是通过包含作为实例变量的对象指针实现的。@interface Unicycle : NSObject{ Pedal *pedal; Tire *tire;}@endpedal 和tire通过复合的方式组成了Unicycle(独轮车)Car 程序如何搭建汽车模型。CarParts 包含在主程序mainCarParts.m中。#import <Foundation/Foundation.h>@interface T 阅读全文
posted @ 2012-08-08 08:32 顺武 阅读(296) 评论(0) 推荐(0) 编辑
摘要: Creating the ViewOne label and two buttonsOne butoon will generate the seed, another button will generate the random number, and the label shows the random number generated by the app.Drag a Label from the library Pane Controls section to the View Window.Drag two rounded rect buttons Click the top b 阅读全文
posted @ 2012-08-07 08:32 顺武 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 3D Css transformations to make a lightning -fast ipad game with creative JavascriptIt's possible to create even smoother animated graphics with CSS manipulated in Javascript,Using transformations, move HTML elements in 3D space caniuse.comautomatically rendered by the GPU,which massively improve 阅读全文
posted @ 2012-07-28 09:50 顺武 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 只要多一个间接层,就没有解决不了的问题不在代码中直接使用某个值,而是使用指向该值的指针基本变量就是间接的一种实际应用#import <Foundation/Foundation.h>int main (int argc, const char *argv[] ){ NSLog(@"The numbers from 1 to 5:"); int i; for(i=1;i<=5;i++) { NSLog(@"%d\n", i); } return (0);}//main文件是另一种间接的示例#import <Foundation/Fo 阅读全文
posted @ 2012-07-27 08:35 顺武 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Objective-C is a combination of C and Small TalksThe trick is to understand the symbols and keywordsUnderstanding the Language Symbolsat the heart of Objective-C is C.It's not important to know which are pure{ his is the begin brace Blocks are used to defin and surround a section of code and def 阅读全文
posted @ 2012-07-23 08:32 顺武 阅读(319) 评论(0) 推荐(0) 编辑
摘要: some of the techniques I use to make my code easier for other programmers and projects to use.dumping useful functions into the utils.js file throughout this book. The problem with just dumping functions into a file in this way is that they become hard to manage and maintain and, as I’ll explain sh. 阅读全文
posted @ 2012-07-19 08:33 顺武 阅读(178) 评论(0) 推荐(0) 编辑