04 2014 档案
摘要:// 获取文件路径 /** 1 * bundle是一个目录,其中包含应用程序的所有资源,通过mainBundle 得到这个目录后就可以获取resource下的资源 */ NSString *filePath = [[NSBundle mainBundle] pathFo...
阅读全文
摘要:属性传值:1、接受方定义一个属性,类型与传值方传的值的类型一致 2、在创建接收方时,给接收方的属性附上值 3、在接收方内部,使用接收到的值代理传值: 1、·前 作为 后的delegate 2、后定义协议 并让 delegate执行协议中的方法,并传参数给deleg...
阅读全文
摘要:做测试之用- (void)viewDidLoad{ [super viewDidLoad]; UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 280, 480) ]; view.background...
阅读全文
摘要:- (void)viewDidLoad{ [superviewDidLoad]; // slider 控制播放速度 UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(40, 250, 150, 30)]; [sel...
阅读全文
摘要:#pragma mark - 轻扫// 开始点击- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; _startPoint = [touc...
阅读全文
摘要:- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject];// 某一个手指 CGPoint currentPoint = [touch locati...
阅读全文
摘要:UIView支持触摸事件 因为继承于UIResponder,而且支持多点触摸,使用时需要定义UIView子类,实现触摸相关的方法- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;点击开始时执行此方法(多么见名知意)- ...
阅读全文
浙公网安备 33010602011771号