IVIS
[편집] semView.m
#import "semView.h"
@implementation semView
@synthesize label, timer,image;
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
label = [[UILabel alloc] initWithFrame:CGRectMake(100, 100,100,30)];
label.backgroundColor = [UIColor redColor];
[label setBackgroundColor:[UIColor yellowColor]];
[self addSubview:label];
label.frame = CGRectMake(200, 200, 100, 30);
[label setText:@"안녕~^^"];
label.textAlignment = UITextAlignmentRight;
label.textColor = [UIColor blueColor];
NSLog(@"ParkMinHye22");
timer = [NSTimer scheduledTimerWithTimeInterval:0.3
target:self
selector:@selector(Ontimer)
userInfo:nil
repeats:YES
];
[self setNeedsDisplay];
}
return self;
}
- (void)drawRect:(CGRect)rect {
// Drawing code
NSLog(@"ParkMinHye");
}
- (void)dealloc {
[super dealloc];
}
-(void)Ontimer{
[self setNeedsDisplay];
}
@end