随笔分类 -  iOS

iOS Dev
摘要:1. 实现文件以.m为后缀名 #import “myClass.h”导入头文件@implementation myClass告诉编译器实现哪个类@synthesize myLabel;为实例变量产生getters和setters方法类方法实现+(NSString)myClassMethod:(NSString)aString{//ImplementtheClassMethodHere!}实例方法实现-(NSString)myInstanceMethod:(NSString)aStringanotherParameter:(NSURL)aURL{//ImplementtheInstanceMe. 阅读全文
posted @ 2012-05-21 13:31 Master HaKu 阅读(558) 评论(0) 推荐(0)
摘要:1. Exploring the Objective-C File Structure 建立一个Objective-C的类会新建两个文件, 一个接口文件(头文件)(interface file), 后缀为.h, 一个实现文件(implementation file), 后缀为.m (见下图) 顾名思义, 接口文件定义所有方法签名, 实现文件具体实现代码逻辑 看下面这段代码#import语句用来导入某个头文件, 学过Java的朋友可以知道, 它类似Java中的import语句, 而Java中是导入某个包Directive(指示语句)Directives are commands that a.. 阅读全文
posted @ 2012-05-18 09:37 Master HaKu 阅读(392) 评论(0) 推荐(0)
摘要:1. Choosing a Project Type 确保选择IOS项目类型 建立好项目之后, 你会发现一个后缀名为.xcodeproj的文件 选择项目组 请记住, 这些只是逻辑组, 你在你的硬盘上找不到他们的名字Classes: 存放类Other Sources: 存放其他资源Resources: 存放图片,声音等其他资源文件Frameworks: 一些框架Products: 项目生成的exe文件2. Adding New Code Files to a Project 重要的一点, 你需要知道的是类由两部分组成: 1) 头文件或者称为接口文件, 后缀名为.h 作用为描述类的功能... 阅读全文
posted @ 2012-05-17 09:36 Master HaKu 阅读(1825) 评论(0) 推荐(0)
摘要:1. Register as a developer athttps://developer.apple.com/devcenter/ios/index.action2. Install XCode Launch Xcode from the Developer/Applications folder.On the right side of the display are the templates within the category, with adescription of the currently highlighted template. For this tutorial,. 阅读全文
posted @ 2012-04-26 10:04 Master HaKu 阅读(186) 评论(0) 推荐(0)