| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- //
- // ImmediatelyCollectionViewCell.m
- // jitao
- //
- // Created by 罗云飞 on 2018/2/6.
- // Copyright © 2018年 罗云飞. All rights reserved.
- //
- #import "ImmediatelyCollectionViewCell.h"
- @implementation ImmediatelyCollectionViewCell{
- UIImageView *image;
- UILabel *title;
- }
- - (id)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- image = [UIImageView new];
- image.backgroundColor = NewRedColor;
- // [self addSubview:image];
-
- image.sd_layout
- .leftEqualToView(self)
- .rightEqualToView(self)
- .heightIs(30)
- .topEqualToView(self);
- _immediatelyrelease = [UILabel new];
- [_immediatelyrelease setText:@"立即发布"];
- _immediatelyrelease.font = NewFont(15);
- [_immediatelyrelease setSingleLineAutoResizeWithMaxWidth:0];
- [self addSubview:_immediatelyrelease];
-
- _immediatelyrelease.sd_layout
- .centerXEqualToView(self)
- .heightIs(15)
- .topSpaceToView(self, 10);
-
- UIImageView *line1 = [UIImageView new];
- [line1 setImage:NewImageNamed(@"fbbxz")];
- [self addSubview:line1];
-
- line1.sd_layout
- .rightSpaceToView(_immediatelyrelease, 10)
- .heightIs(1)
- .leftSpaceToView(self, fitScreenWidth(40))
- .centerYEqualToView(_immediatelyrelease);
-
- UIImageView *line2 = [UIImageView new];
- [line2 setImage:NewImageNamed(@"fbbxy")];
- [self addSubview:line2];
-
- line2.sd_layout
- .rightSpaceToView(self, fitScreenWidth(40))
- .heightIs(1)
- .leftSpaceToView(_immediatelyrelease, 10)
- .centerYEqualToView(_immediatelyrelease);
-
- title = [UILabel new];
- title.text = @"全领域的技术交易平台";
- title.font = NewFont(13);
- title.textColor = [UIColor colorWithString:@"#9A9A9A"];
- [title setSingleLineAutoResizeWithMaxWidth:0];
- [self addSubview:title];
-
- title.sd_layout
- .topSpaceToView(image, 5)
- .heightIs(15)
- .centerXEqualToView(self);
-
- _releaserequirementsBT = [UIButton new];
- [_releaserequirementsBT setTitle:@"发布需求" forState:0];
- [_releaserequirementsBT setTitleColor:NewButtonColor forState:0];
- _releaserequirementsBT.titleLabel.font = NewFont(13);
- ViewBorderRadius(_releaserequirementsBT, 5, 1, NewButtonColor);
- [self addSubview:_releaserequirementsBT];
-
- _releaserequirementsBT.sd_layout
- .rightSpaceToView(self, self.width/2+(54/2))
- .heightIs(27)
- .widthIs(70)
- .bottomSpaceToView(self, 25);
-
- _releaseresultsBT = [UIButton new];
- [_releaseresultsBT setTitle:@"发布知产" forState:0];
- [_releaseresultsBT setTitleColor:NewWhiteColor forState:0];
- _releaseresultsBT.backgroundColor = NewButtonColor;
- _releaseresultsBT.titleLabel.font = NewFont(13);
- ViewBorderRadius(_releaseresultsBT, 5, 1, NewClearColor);
- [self addSubview:_releaseresultsBT];
-
- _releaseresultsBT.sd_layout
- .leftSpaceToView(_releaserequirementsBT, 54)
- .heightIs(27)
- .widthIs(70)
- .bottomSpaceToView(self, 25);
-
- UILabel *line = [UILabel new];
- line.backgroundColor = NewLineGrayColor;
- [self addSubview:line];
-
- line.sd_layout
- .leftEqualToView(self)
- .rightEqualToView(self)
- .heightIs(10)
- .bottomEqualToView(self);
-
-
-
- }
- return self;
- }
- @end
|