40 lines
869 B
Objective-C
40 lines
869 B
Objective-C
//
|
|
// ZBCycleView.m
|
|
// CycleVerticalView
|
|
//
|
|
// Created by 周博 on 2019/1/8.
|
|
// Copyright © 2019 EL. All rights reserved.
|
|
//
|
|
|
|
#import "ZBCycleView.h"
|
|
@interface ZBCycleView ()
|
|
|
|
@property (strong, nonatomic) UILabel *titleLabel;
|
|
|
|
@end
|
|
|
|
@implementation ZBCycleView
|
|
|
|
- (instancetype)initWithFrame:(CGRect)frame{
|
|
self = [super initWithFrame:frame];
|
|
if (self) {
|
|
_titleLabel = [[UILabel alloc] init];
|
|
_titleLabel.font = [UIFont systemFontOfSize:15];
|
|
_titleLabel.textColor = [UIColor blackColor];
|
|
[self addSubview:_titleLabel];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)layoutSubviews{
|
|
[super layoutSubviews];
|
|
_titleLabel.frame = CGRectMake(15, 0, CGRectGetWidth(self.frame)-30, CGRectGetHeight(self.frame));
|
|
}
|
|
|
|
- (void)setDicData:(NSDictionary *)dicData{
|
|
_dicData = dicData;
|
|
_titleLabel.text = dicData[@"TITLE"];
|
|
}
|
|
|
|
@end
|