//
// DrawViewController.m
// AppUI组件学习
//
// Created by 麦子 on 15/6/24.
// Copyright (c) 2015年 麦子. All rights reserved.
//
#import "DrawViewController.h"
#import "MyView.h"
@interface DrawViewController ()
@end
@implementation DrawViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"画视图";
MyView *view = [[MyView alloc] init];
self.view = view;
[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(timeBusiness:) userInfo:nil repeats:YES];
}
- (void)timeBusiness:(NSTimer *)timer{
[self.view setNeedsDisplay];
// 干掉定时器
// [timer invalidate];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//// MyView.h// AppUI组件学习//// Created by 麦子 on 15/6/24.// Copyright (c) 2015年 麦子. All rights reserved.//#import @interface MyView : UIView@property(nonatomic,assign) CGPoint point;@e