| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // MOGuildApplyView.m
- // MiMoLive
- //
- // Created by SuperC on 2023/10/25.
- //
- #import "MOGuildApplyView.h"
- @implementation MOGuildApplyView
- + (instancetype)moGuildApplyView{
- return [[[NSBundle mainBundle] loadNibNamed:@"MOGuildApplyView" owner:self options:nil] firstObject];
- }
- - (void)awakeFromNib{
- [super awakeFromNib];
-
- self.backgroundColor = [UIColor clearColor];
-
- self.contantView.layer.cornerRadius = 12.0;
- self.contantView.layer.masksToBounds = YES;
-
- NSArray *colorArr = @[[MOTools colorWithHexString:@"#FF62EE" alpha:1.0],[MOTools colorWithHexString:@"#9923FF" alpha:1.0]];
- UIImage *image = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, (SCREENWIDTH - 36.0 * 2), 50.0) Colors:colorArr GradientType:0];
- [self.doneBtn setBackgroundImage:image forState:UIControlStateNormal];
- self.doneBtn.layer.cornerRadius = 48.0 / 2.0;
- self.doneBtn.layer.masksToBounds = YES;
-
- [self.titleBtn setTitle:NSLocalString(@"mimo_guild_recruitment_requirements") forState:UIControlStateNormal];
- self.firstTipLab.text = NSLocalString(@"mimo_guild_recruitment_requirements_content1");
- self.secondTipLab.text = NSLocalString(@"mimo_guild_recruitment_requirements_content2");
- [self.doneBtn setTitle:NSLocalString(@"mimo_guild_apply_to_settle_in_title") forState:UIControlStateNormal];
-
- self.thirdTipLab.text = NSLocalString(@"mimo_guild_applying_tips");
- }
- - (CGFloat)getViewHeight{
-
- CGFloat labWidth = SCREENWIDTH - 37.0 - 23.0;
- CGFloat firstLabHeight = [MOTools calculateRowHeight:self.firstTipLab.text fontSize:14.0 andWidth:labWidth];
- CGFloat secondLabHeight = [MOTools calculateRowHeight:self.secondTipLab.text fontSize:14.0 andWidth:labWidth];
-
- CGFloat height = 33.0 + 14.0 + firstLabHeight + 15.0 + secondLabHeight + 15.0 + 48.0 + 20.0;
-
- return height;
- }
- - (IBAction)doneBtnClick:(id)sender {
- self.doneBtnBlock ? self.doneBtnBlock() : nil;
- }
- @end
|