摘要: •项目的Supporting files文件夹下面有个“工程名-Prefix.pch”文件,也是一个头文件••pch头文件的内容能被项目中的其他所有源文件共享和访问••一般在pch文件中定义一些全局的宏••在pch文件中添加下列预处理指令,然后在项目中使用Log(…)来输出日志信息,就可以在发布应用... 阅读全文
posted @ 2015-04-10 21:56 pocket_live 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-04-10 21:51 pocket_live 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 在main.m文件中:#import #import "MJAppDelegate.h"int main(int argc, char * argv[]){ @autoreleasepool { /* argc: 系统或者用户传入的参数个数 arg... 阅读全文
posted @ 2015-04-10 21:00 pocket_live 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 1 // 程序刚刚启动时最先创建的时UIApplication对象,它是一个单利对象,是一个程序的象征,所以不能以UIApplication *app = [[UIApplication alloc] init];方式来创建,使用方法是UIApplication *app = [UIApplica... 阅读全文
posted @ 2015-04-10 15:35 pocket_live 阅读(153) 评论(0) 推荐(0) 编辑
摘要: #import "YYViewController.h" 10 11 //私有扩展 12 @interface YYViewController () 13 14 @property(nonatomic,weak)IBOutlet UIButton *headImageView; 15 @end... 阅读全文
posted @ 2015-03-11 23:31 pocket_live 阅读(326) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"@interface ViewController ()@property (nonatomic, weak) UITextField *_textName;@property (nonatomic, weak) UITextField *_tex... 阅读全文
posted @ 2015-03-11 23:30 pocket_live 阅读(5808) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"#define kImage @"image"#define kDescribe @"describe"@interface ViewController ()@property (nonatomic, weak) UIImageView *pro... 阅读全文
posted @ 2015-03-11 23:28 pocket_live 阅读(284) 评论(0) 推荐(0) 编辑
摘要: // 实现图片的旋转和移动和放大缩小#import "ViewController.h"@interface ViewController ()@property (nonatomic, weak) UIButton *_btnImage;@end@implementation ViewContro... 阅读全文
posted @ 2015-03-11 23:27 pocket_live 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 苹果API常用英语名词:0. indicating 决定1.in order to 以便2.rectangle bounds 矩形尺寸3.applied 应用4.entirety 全部5.technique 方法6.truncating 截短7.wrapping 换行8.string 字符串9.f... 阅读全文
posted @ 2015-03-11 23:26 pocket_live 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 纯代码创建Button控件:// 创建按钮UIButton *btn = [[UIButton alloc] init];// 添加按钮[self.view addSubview:btn];// 设置framebtn.frame = CGRectMake(50, 50, 100, 100);// 设... 阅读全文
posted @ 2015-03-11 23:25 pocket_live 阅读(398) 评论(0) 推荐(0) 编辑