ifish/Ifish/UMCommunity/UMCommunitySDK/UMCommunityUI/CustomView/PhotoSelector/UMAssetsCollectionOverlayVi...

42 lines
1.3 KiB
Objective-C

//
// UMAssetsCollectionOverlayView.m
// UMCommunity
//
// Created by luyiyuan on 14/9/9.
// Copyright (c) 2014年 Umeng. All rights reserved.
//
#import "UMAssetsCollectionOverlayView.h"
#import "UMAssetsCollectionCheckMarkView.h"
@interface UMAssetsCollectionOverlayView()
@property (nonatomic, strong) UMAssetsCollectionCheckMarkView *checkmarkView;
@end
@implementation UMAssetsCollectionOverlayView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// View settings
self.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.4];
// Create a checkmark view
UMAssetsCollectionCheckMarkView *checkmarkView = [[UMAssetsCollectionCheckMarkView alloc] initWithFrame:CGRectMake(self.bounds.size.width - (4.0 + 24.0), self.bounds.size.height - (4.0 + 24.0), 24.0, 24.0)];
checkmarkView.autoresizingMask = UIViewAutoresizingNone;
checkmarkView.layer.shadowColor = [[UIColor grayColor] CGColor];
checkmarkView.layer.shadowOffset = CGSizeMake(0, 0);
checkmarkView.layer.shadowOpacity = 0.6;
checkmarkView.layer.shadowRadius = 2.0;
[self addSubview:checkmarkView];
self.checkmarkView = checkmarkView;
}
return self;
}
@end