|
@@ -26,34 +26,42 @@
|
|
|
{
|
|
|
if (self = [super initWithFrame:frame]) {
|
|
|
|
|
|
- self.backgroundColor = [UIColor whiteColor];
|
|
|
- self.layer.masksToBounds = YES;
|
|
|
- self.layer.cornerRadius = 10;
|
|
|
+ self.backgroundColor = [UIColor clearColor];
|
|
|
|
|
|
|
|
|
- UIImageView *imageV = [ZKControl createImageViewFrame:CGRectMake(20, 20, 50, 50) imageName:@""];
|
|
|
- [self addSubview:imageV];
|
|
|
+ UIButton *downBtn = [ZKControl createButtonWithFrame:CGRectMake(self.width-35, 0, 25, 25) title:@"" titleColor:[UIColor whiteColor] titleFont:15 imageName:@"shutdown" bgImageName:nil target:self method:@selector(downBtnClick)];
|
|
|
+ [self addSubview:downBtn];
|
|
|
+
|
|
|
+
|
|
|
+ UIView *contentView = [ZKControl createViewWithFrame:CGRectMake(0, 40, self.width, self.height-90) color:[UIColor whiteColor]];
|
|
|
+ contentView.layer.masksToBounds = YES;
|
|
|
+ contentView.layer.cornerRadius = 10;
|
|
|
+ [self addSubview:contentView];
|
|
|
+
|
|
|
+ UIImageView *imageV = [ZKControl createImageViewFrame:CGRectMake(20, 20, 55, 55) imageName:@""];
|
|
|
+ [contentView addSubview:imageV];
|
|
|
self.iconImageV = imageV;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- UILabel *titleLabel = [ZKControl createLabelWithFrame:CGRectMake(imageV.right+10, 25, self.width-imageV.right-10, 18) font:15 text:@"" TextAlignment:NSTextAlignmentLeft TextColor:UIColorFromRGB(0x000000) bgColor:nil];
|
|
|
- [self addSubview:titleLabel];
|
|
|
+
|
|
|
+ UILabel *titleLabel = [ZKControl createLabelWithFrame:CGRectMake(imageV.right+10, 25, self.width-imageV.right-10, 18) font:15 text:@"" TextAlignment:NSTextAlignmentLeft TextColor:UIColorFromRGB(0x171826) bgColor:nil];
|
|
|
+ [contentView addSubview:titleLabel];
|
|
|
self.titleLabel = titleLabel;
|
|
|
|
|
|
- UILabel *subtitleLabel = [ZKControl createLabelWithFrame:CGRectMake(imageV.right+10, titleLabel.bottom+2, titleLabel.width, 25) font:13 text:@"" TextAlignment:NSTextAlignmentLeft TextColor:UIColorFromRGB(0x000000) bgColor:nil];
|
|
|
- subtitleLabel.alpha = 0.5;
|
|
|
- [self addSubview:subtitleLabel];
|
|
|
+ UILabel *subtitleLabel = [ZKControl createLabelWithFrame:CGRectMake(imageV.right+10, titleLabel.bottom+2, titleLabel.width, 25) font:13 text:@"" TextAlignment:NSTextAlignmentLeft TextColor:UIColorFromRGB(0x5F5E64) bgColor:nil];
|
|
|
+ [contentView addSubview:subtitleLabel];
|
|
|
self.subtitleLabel = subtitleLabel;
|
|
|
|
|
|
- UIButton *button = [ZKControl createButtonWithFrame:CGRectMake(20, imageV.bottom+25, self.width-40, 40) title:@"" titleColor:[UIColor whiteColor] titleFont:15 imageName:nil bgImageName:nil target:self method:@selector(doneClick)];
|
|
|
+ UIButton *button = [ZKControl createButtonWithFrame:CGRectMake(20, imageV.bottom+25, self.width-40, 40) title:@"" titleColor:UIColorFromRGB(0xF7F9FA) titleFont:15 imageName:nil bgImageName:nil target:self method:@selector(doneClick)];
|
|
|
button.layer.cornerRadius = 5;
|
|
|
button.layer.masksToBounds = YES;
|
|
|
- button.backgroundColor = UIColorRGBA(92, 188, 206, 1);
|
|
|
- [self addSubview:button];
|
|
|
+ button.backgroundColor = UIColorFromRGB(0x2ABED1);
|
|
|
+ [contentView addSubview:button];
|
|
|
self.doneBtn = button;
|
|
|
|
|
|
- UILabel *bottomLabel = [ZKControl createLabelWithFrame:CGRectMake(0, button.bottom, self.width, 40) font:13 text:@"" TextAlignment:NSTextAlignmentCenter TextColor:UIColorFromRGB(0x000000) bgColor:nil];
|
|
|
- bottomLabel.alpha = 0.5;
|
|
|
- [self addSubview:bottomLabel];
|
|
|
+ UILabel *bottomLabel = [ZKControl createLabelWithFrame:CGRectMake(0, button.bottom, self.width, 40) font:12 text:@"" TextAlignment:NSTextAlignmentCenter TextColor:UIColorFromRGB(0x9B9CA3) bgColor:nil];
|
|
|
+ [contentView addSubview:bottomLabel];
|
|
|
self.bottomLabel = bottomLabel;
|
|
|
//
|
|
|
|
|
@@ -87,8 +95,10 @@
|
|
|
}
|
|
|
- (void)setImgUrl:(NSString *)imgUrl {
|
|
|
_imgUrl = imgUrl;
|
|
|
- //加载网络图片-测试本地
|
|
|
- self.iconImageV.image = [UIImage imageNamed:@"logo"];
|
|
|
+ NSURL *photourl = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kHost,imgUrl]];
|
|
|
+ //url请求实在UI主线程中进行的
|
|
|
+ UIImage *images = [UIImage imageWithData:[NSData dataWithContentsOfURL:photourl]];//通过网络url获取uiimage
|
|
|
+ self.iconImageV.image = images;
|
|
|
|
|
|
}
|
|
|
- (void)setAppUrl:(NSString *)appUrl {
|
|
@@ -111,6 +121,11 @@
|
|
|
[self.delegate clipboardClick:self.appUrl];
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+-(void)downBtnClick {
|
|
|
+ [[ZKModal sharedInstance] hide];
|
|
|
+}
|
|
|
+
|
|
|
-(void)show
|
|
|
{
|
|
|
[[ZKModal sharedInstance] showWithContentView:self andAnimated:YES];
|