12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- //
- // NYFailItemPointCellView01.m
- // jiaPei
- //
- // Created by Ning.ge on 2024/12/17.
- // Copyright © 2024 JCZ. All rights reserved.
- //
- #import "NYFailItemPointCellView01.h"
- @implementation NYFailItemPointCellView01
- - (instancetype)initWithFrame:(CGRect)frame {
- if (self = [super initWithFrame:frame]) {
- self.layer.cornerRadius = 5;
- self.layer.masksToBounds = YES;
- CGFloat topbarH = 40;
- UIView *topbar_view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, topbarH)];
- topbar_view.backgroundColor = UIColorHex(0xC1D7FF);
- [self addSubview:topbar_view];
- self.topbar_view = topbar_view;
- CGFloat contentH = frame.size.height - topbarH;
- UIView *content_view = [[UIView alloc] initWithFrame:CGRectMake(0, topbarH, frame.size.width, contentH)];
- [self addSubview:content_view];
- self.content_view = content_view;
-
- UILabel *topbar_label = [[UILabel alloc] initWithFrame:topbar_view.bounds];
- topbar_label.textAlignment = NSTextAlignmentCenter;
- topbar_label.font = [UIFont boldSystemFontOfSize:15.f];
- topbar_label.textColor = UIColorHex(0x173CA7);
- topbar_label.text = @"考试常识";
- [topbar_view addSubview:topbar_label];
- self.topbar_label = topbar_label;
-
- }
- return self;
- }
- - (void)layoutSubviews{
- [super layoutSubviews];
- }
- @end
|