01 2015 档案

摘要:bundle是一个目录,其中包含了程序会使用到的资源. 这些资源包含了如图像,声音,编译好的代码,nib文件(用户也会把bundle称为plug-in). 对应bundle,cocoa提供了类NSBundle.我们的程序是一个bundle. 在Finder中,一个应用程序看上去和其他文件没有什么区别... 阅读全文
posted @ 2015-01-19 16:06 代佳宏 阅读(177) 评论(0) 推荐(0) 编辑
摘要:#import "ViewController.h"@import MediaPlayer;@interface ViewController (){ MPMoviePlayerController *_mov;}@property (weak, nonatomic) IBOutlet UIImag... 阅读全文
posted @ 2015-01-15 12:01 代佳宏 阅读(156) 评论(0) 推荐(0) 编辑
摘要:CAEmitterLayer *snowEmitter = [CAEmitterLayer layer]; //例子发射位置 snowEmitter.emitterPosition = CGPointMake(120,20); //发射源的尺寸大小 snowEmitter.emitterSi... 阅读全文
posted @ 2015-01-13 10:21 代佳宏 阅读(222) 评论(0) 推荐(0) 编辑
摘要:#import "ViewController.h"@interface ViewController (){ CALayer *_l1;//定义能够全局使用 CALayer *_l2;}@end@implementation ViewController- (void)viewDidLoad { ... 阅读全文
posted @ 2015-01-12 17:19 代佳宏 阅读(199) 评论(0) 推荐(0) 编辑
摘要:- (void)setTitle:(NSString *)title forState:(UIControlState)state;//设置标题- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state;//设置标题颜色... 阅读全文
posted @ 2015-01-08 21:48 代佳宏 阅读(129) 评论(0) 推荐(0) 编辑
摘要:《 UIControl》1 处理用户事件的控件的基类,如UIButton,UISlider等2 一般不直接实例化,而是使用他的子类3 可以通过跟踪触摸事件来设置和获取控件状态,并且这些方法可以被子类继承//添加一个事件- (void)addTarget:(id)target action:(SEL)... 阅读全文
posted @ 2015-01-08 20:40 代佳宏 阅读(226) 评论(0) 推荐(0) 编辑
摘要://通过xib文件创建一个视图控制器。并作为窗口的根控制器self.viewController = [[ViewController alloc] initWithNibName:@"ViewController"bundle:nil];//通过代码创建一个视图控制器,self.viewContr... 阅读全文
posted @ 2015-01-08 19:19 代佳宏 阅读(144) 评论(0) 推荐(0) 编辑
摘要:UIImageView的作用是显示图片和多张动态的图片- (id)initWithImage:(UIImage *)image;//初始化图片视图- (id)initWithImage:(UIImage *)image highlightedImage:(UIImage *)highlightedI... 阅读全文
posted @ 2015-01-08 10:24 代佳宏 阅读(148) 评论(0) 推荐(0) 编辑
摘要:UILabel 的作用是显示文本UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(100, 100, 100, 40)]; label.text = @"代佳宏";//创建文本的内容 nillabel.textColor = [UI... 阅读全文
posted @ 2015-01-08 10:08 代佳宏 阅读(143) 评论(0) 推荐(0) 编辑
摘要:// AppDelegate.m#import "AppDelegate.h"#import "ViewController.h"@interface AppDelegate ()@end@implementation AppDelegate- (BOOL)application:(UIApplic... 阅读全文
posted @ 2015-01-05 19:17 代佳宏 阅读(217) 评论(0) 推荐(0) 编辑

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