44 lines
1.2 KiB
Objective-C
44 lines
1.2 KiB
Objective-C
//
|
|
// DSWebDragView.m
|
|
// VietnamGame
|
|
//
|
|
//
|
|
|
|
#import "DSWebDragView.h"
|
|
|
|
@implementation DSWebDragView
|
|
|
|
-(void)awakeFromNib
|
|
{
|
|
[super awakeFromNib];
|
|
|
|
self.userInteractionEnabled = YES;
|
|
self.backgroundColor = [UIColor clearColor];
|
|
|
|
self.homeImageView = [[UIImageView alloc] initWithFrame:self.bounds];
|
|
self.homeImageView.image = [UIImage imageNamed:@"menu2"];
|
|
self.homeImageView.backgroundColor = [UIColor whiteColor];
|
|
self.homeImageView.layer.cornerRadius = 30.f;
|
|
self.homeImageView.layer.masksToBounds = YES;
|
|
[self addSubview:self.homeImageView];
|
|
}
|
|
|
|
-(instancetype)initWithFrame:(CGRect)frame
|
|
{
|
|
self = [super initWithFrame:frame];
|
|
if (self) {
|
|
self.userInteractionEnabled = YES;
|
|
self.backgroundColor = [UIColor clearColor];
|
|
|
|
self.homeImageView = [[UIImageView alloc] initWithFrame:self.bounds];
|
|
self.homeImageView.image = [UIImage imageNamed:@"menu2"];
|
|
self.homeImageView.backgroundColor = [UIColor whiteColor];
|
|
self.homeImageView.layer.cornerRadius = 30.f;
|
|
self.homeImageView.layer.masksToBounds = YES;
|
|
[self addSubview:self.homeImageView];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
@end
|