IVIS
[편집] semina.m
#import "semina.h"
@implementation semina
@synthesize image, tex,lab, view, lab2, tex2;
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
view = [[UIImageView alloc] initWithFrame:CGRectMake(80,30,140,130)];
[view setImage:[UIImage imageNamed:@"벌2.png"]];
[self addSubview:view];
lab = [[UILabel alloc]initWithFrame:CGRectMake(5,170,100,20)];
[lab setBackgroundColor:[UIColor grayColor]];
[lab setText:@"name : "];
lab.textAlignment = UITextAlignmentLeft;
[self addSubview:lab];
lab2 = [[UILabel alloc]initWithFrame:CGRectMake(5,200,100,20)];
[lab2 setBackgroundColor:[UIColor grayColor]];
[lab2 setText:@"Number : "];
lab2.textAlignment = UITextAlignmentLeft;
[self addSubview:lab2];
tex = [[UITextField alloc]initWithFrame:CGRectMake(110,170,180,25)];
[tex setPlaceholder:@"Type in a Name"];
[tex setBorderStyle:(UITextBorderStyleRoundedRect)];
tex.textAlignment = UITextAlignmentRight;
[self addSubview:tex];
tex = [[UITextField alloc]initWithFrame:CGRectMake(110,200,180,25)];
[tex setPlaceholder:@"Type in a Number"];
[tex setBorderStyle:(UITextBorderStyleRoundedRect)];
tex.textAlignment = UITextAlignmentRight;
[self addSubview:tex];
[self setNeedsDisplay];
}
return self;
}
- (void)drawRect:(CGRect)rect {
// Drawing code
}
- (void)Ontimer{
[self setNeedsDisplay];
}
- (void)dealloc {
[super dealloc];
}
@end