create
This commit is contained in:
43
ShenQi/WMDragView/DSWebDragView.m
Normal file
43
ShenQi/WMDragView/DSWebDragView.m
Normal file
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// 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:@"menu"];
|
||||
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:@"menu"];
|
||||
self.homeImageView.backgroundColor = [UIColor whiteColor];
|
||||
self.homeImageView.layer.cornerRadius = 30.f;
|
||||
self.homeImageView.layer.masksToBounds = YES;
|
||||
[self addSubview:self.homeImageView];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user