Commit 260a74683b13c39a860b4a46acb7153d4b3a2fd6
1 parent
a0a31e86
0.5.1
Showing
2 changed files
with
28 additions
and
6 deletions
CNLiveCMineModule.podspec
CNLiveCMineModule/Classes/CNCMine/View/CNTopImageView.m
| ... | ... | @@ -30,13 +30,13 @@ |
| 30 | 30 | [self addSubview:self.codesView]; |
| 31 | 31 | [self addSubview:self.iconImage]; |
| 32 | 32 | [self addSubview:self.titleLabel]; |
| 33 | + NSString *userStatus = [[NSUserDefaults standardUserDefaults] valueForKey:CNLiveUnionUserStatusWithSourceForKey]; | |
| 34 | + if ([userStatus isNotBlank] && ([userStatus isEqualToString:@"3"]||[userStatus isEqualToString:@"2"])) { | |
| 35 | + [self addSubview:self.unionBtn]; | |
| 36 | + } | |
| 37 | + [self addSubview:self.myCommuintyBtn]; | |
| 33 | 38 | if (![CNLiveEnvironmentManager manager].isNewHomePage) { |
| 34 | 39 | [self addSubview:self.homelandBtn]; |
| 35 | - NSString *userStatus = [[NSUserDefaults standardUserDefaults] valueForKey:CNLiveUnionUserStatusWithSourceForKey]; | |
| 36 | - if ([userStatus isNotBlank] && ([userStatus isEqualToString:@"3"]||[userStatus isEqualToString:@"2"])) { | |
| 37 | - [self addSubview:self.unionBtn]; | |
| 38 | - } | |
| 39 | - [self addSubview:self.myCommuintyBtn]; | |
| 40 | 40 | }else{ |
| 41 | 41 | [self addSubview:self.backBtn]; |
| 42 | 42 | [self addSubview:self.myImage]; |
| ... | ... | @@ -87,6 +87,28 @@ |
| 87 | 87 | make.height.mas_equalTo(DS_adapt_length(26)); |
| 88 | 88 | make.width.mas_equalTo(DS_adapt_length(86.5)); |
| 89 | 89 | }]; |
| 90 | + NSString *userStatus = [[NSUserDefaults standardUserDefaults] valueForKey:CNLiveUnionUserStatusWithSourceForKey]; | |
| 91 | + if ([userStatus isNotBlank] && ([userStatus isEqualToString:@"3"]||[userStatus isEqualToString:@"2"])) { | |
| 92 | + [self.unionBtn mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 93 | + make.left.equalTo(self.myImage.mas_right).offset(10); | |
| 94 | + make.top.equalTo(self.myImage); | |
| 95 | + make.height.mas_equalTo(DS_adapt_length(26)); | |
| 96 | + make.width.mas_equalTo(DS_adapt_length(86.5)); | |
| 97 | + }]; | |
| 98 | + [self.myCommuintyBtn mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 99 | + make.left.equalTo(self.unionBtn.mas_right).offset(10); | |
| 100 | + make.top.equalTo(self.myImage); | |
| 101 | + make.height.mas_equalTo(DS_adapt_length(26)); | |
| 102 | + make.width.mas_equalTo(DS_adapt_length(86.5)); | |
| 103 | + }]; | |
| 104 | + }else{ | |
| 105 | + [self.myCommuintyBtn mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 106 | + make.left.equalTo(self.myImage.mas_right).offset(10); | |
| 107 | + make.top.equalTo(self.myImage); | |
| 108 | + make.height.mas_equalTo(DS_adapt_length(26)); | |
| 109 | + make.width.mas_equalTo(DS_adapt_length(86.5)); | |
| 110 | + }]; | |
| 111 | + } | |
| 90 | 112 | }else{ |
| 91 | 113 | [self.codesView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 92 | 114 | make.top.equalTo(self).offset(kStatusHeight); | ... | ... |