Commit d4e747ac0c412d743825cf29bb0f8924e795f93a
1 parent
ed888a12
修复云测bug
Showing
6 changed files
with
144 additions
and
115 deletions
CNLiveCMineModule.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveCMineModule' | 10 | s.name = 'CNLiveCMineModule' |
| 11 | - s.version = '0.5.8' | 11 | + s.version = '0.5.9' |
| 12 | s.summary = '网家家C端个人中心' | 12 | s.summary = '网家家C端个人中心' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveCMineModule/Classes/CNCMine/View/CNTopImageView.m
| @@ -158,6 +158,7 @@ | @@ -158,6 +158,7 @@ | ||
| 158 | { | 158 | { |
| 159 | _titleLabel.font = UIFontCNMake(17); | 159 | _titleLabel.font = UIFontCNMake(17); |
| 160 | [self.iconImage sd_setImageWithURL:[NSURL URLWithString:CNUserShareModel.faceUrl] placeholderImage:[UIImage imageNamed:@"mine_no_Avatar"]]; | 160 | [self.iconImage sd_setImageWithURL:[NSURL URLWithString:CNUserShareModel.faceUrl] placeholderImage:[UIImage imageNamed:@"mine_no_Avatar"]]; |
| 161 | + [self.mineListView uploadViews]; | ||
| 161 | if (![NSString isEmpty:CNUserShareModel.nickname]) { | 162 | if (![NSString isEmpty:CNUserShareModel.nickname]) { |
| 162 | [self.titleLabel setText:CNUserShareModel.nickname]; | 163 | [self.titleLabel setText:CNUserShareModel.nickname]; |
| 163 | } else { | 164 | } else { |
CNLiveCMineModule/Classes/CNCSubMine/View/CNMineInfoCell.m
| @@ -13,7 +13,6 @@ | @@ -13,7 +13,6 @@ | ||
| 13 | @property (nonatomic ,strong) QMUILabel *detailLbl; | 13 | @property (nonatomic ,strong) QMUILabel *detailLbl; |
| 14 | @property (nonatomic ,strong) UIImageView *detailIcon; | 14 | @property (nonatomic ,strong) UIImageView *detailIcon; |
| 15 | @property (nonatomic ,strong) UIView *lineV; | 15 | @property (nonatomic ,strong) UIView *lineV; |
| 16 | -@property (nonatomic ,strong) UIView *thickLineV; | ||
| 17 | @property (nonatomic ,strong) UIImageView *QRCodeImgV; | 16 | @property (nonatomic ,strong) UIImageView *QRCodeImgV; |
| 18 | 17 | ||
| 19 | @end | 18 | @end |
| @@ -34,8 +33,13 @@ | @@ -34,8 +33,13 @@ | ||
| 34 | [self.contentView addSubview:self.detailLbl]; | 33 | [self.contentView addSubview:self.detailLbl]; |
| 35 | [self.contentView addSubview:self.detailIcon]; | 34 | [self.contentView addSubview:self.detailIcon]; |
| 36 | [self.contentView addSubview:self.lineV]; | 35 | [self.contentView addSubview:self.lineV]; |
| 37 | - [self.contentView addSubview:self.thickLineV]; | ||
| 38 | [self.contentView addSubview:self.QRCodeImgV]; | 36 | [self.contentView addSubview:self.QRCodeImgV]; |
| 37 | + [self.lineV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 38 | + make.bottom.equalTo(self.contentView); | ||
| 39 | + make.left.equalTo(self.contentView).offset(10); | ||
| 40 | + make.right.equalTo(self.contentView).offset(-10); | ||
| 41 | + make.height.mas_equalTo(1); | ||
| 42 | + }]; | ||
| 39 | } | 43 | } |
| 40 | 44 | ||
| 41 | - (void)layoutSubviews { | 45 | - (void)layoutSubviews { |
| @@ -48,7 +52,6 @@ | @@ -48,7 +52,6 @@ | ||
| 48 | self.iconImageView.hidden = YES; | 52 | self.iconImageView.hidden = YES; |
| 49 | self.detailLbl.hidden = YES; | 53 | self.detailLbl.hidden = YES; |
| 50 | self.lineV.hidden = YES; | 54 | self.lineV.hidden = YES; |
| 51 | - self.thickLineV.hidden = YES; | ||
| 52 | self.QRCodeImgV.hidden = YES; | 55 | self.QRCodeImgV.hidden = YES; |
| 53 | [self.titleLbl mas_makeConstraints:^(MASConstraintMaker *make) { | 56 | [self.titleLbl mas_makeConstraints:^(MASConstraintMaker *make) { |
| 54 | make.left.equalTo(self.contentView).offset(20); | 57 | make.left.equalTo(self.contentView).offset(20); |
| @@ -63,6 +66,7 @@ | @@ -63,6 +66,7 @@ | ||
| 63 | case MineInfoCellTypeIcon: | 66 | case MineInfoCellTypeIcon: |
| 64 | { | 67 | { |
| 65 | self.iconImageView.hidden = NO; | 68 | self.iconImageView.hidden = NO; |
| 69 | + self.lineV.hidden = NO; | ||
| 66 | [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.faceUrl] placeholderImage:kCNLiveDefaultUserCircleIcon]; | 70 | [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.faceUrl] placeholderImage:kCNLiveDefaultUserCircleIcon]; |
| 67 | [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { | 71 | [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 68 | make.top.equalTo(self.contentView).offset(10); | 72 | make.top.equalTo(self.contentView).offset(10); |
| @@ -81,12 +85,6 @@ | @@ -81,12 +85,6 @@ | ||
| 81 | make.right.equalTo(self.contentView).offset(-33); | 85 | make.right.equalTo(self.contentView).offset(-33); |
| 82 | make.left.equalTo(self.titleLbl.mas_right).offset(10); | 86 | make.left.equalTo(self.titleLbl.mas_right).offset(10); |
| 83 | }]; | 87 | }]; |
| 84 | - [self.lineV mas_remakeConstraints:^(MASConstraintMaker *make) { | ||
| 85 | - make.top.equalTo(self.contentView); | ||
| 86 | - make.left.equalTo(self.contentView).offset(10); | ||
| 87 | - make.right.equalTo(self.contentView).offset(-10); | ||
| 88 | - make.height.mas_equalTo(1); | ||
| 89 | - }]; | ||
| 90 | } | 88 | } |
| 91 | break; | 89 | break; |
| 92 | case MineInfoCellTypeSex: | 90 | case MineInfoCellTypeSex: |
| @@ -108,20 +106,8 @@ | @@ -108,20 +106,8 @@ | ||
| 108 | break; | 106 | break; |
| 109 | case MineInfoCellTypeQR_code: | 107 | case MineInfoCellTypeQR_code: |
| 110 | { | 108 | { |
| 111 | - self.thickLineV.hidden = NO; | ||
| 112 | self.lineV.hidden = NO; | 109 | self.lineV.hidden = NO; |
| 113 | self.QRCodeImgV.hidden = NO; | 110 | self.QRCodeImgV.hidden = NO; |
| 114 | - [self.thickLineV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 115 | - make.top.equalTo(self.contentView); | ||
| 116 | - make.left.right.equalTo(self.contentView); | ||
| 117 | - make.height.mas_equalTo(10); | ||
| 118 | - }]; | ||
| 119 | - [self.lineV mas_remakeConstraints:^(MASConstraintMaker *make) { | ||
| 120 | - make.bottom.equalTo(self.contentView); | ||
| 121 | - make.left.equalTo(self.contentView).offset(10); | ||
| 122 | - make.right.equalTo(self.contentView).offset(-10); | ||
| 123 | - make.height.mas_equalTo(1); | ||
| 124 | - }]; | ||
| 125 | [self.QRCodeImgV mas_makeConstraints:^(MASConstraintMaker *make) { | 111 | [self.QRCodeImgV mas_makeConstraints:^(MASConstraintMaker *make) { |
| 126 | make.centerY.equalTo(self.contentView); | 112 | make.centerY.equalTo(self.contentView); |
| 127 | make.right.equalTo(self.contentView).offset(-33); | 113 | make.right.equalTo(self.contentView).offset(-33); |
| @@ -133,6 +119,7 @@ | @@ -133,6 +119,7 @@ | ||
| 133 | case MineInfoCellTypeLocation: | 119 | case MineInfoCellTypeLocation: |
| 134 | { | 120 | { |
| 135 | self.detailLbl.hidden = NO; | 121 | self.detailLbl.hidden = NO; |
| 122 | + self.lineV.hidden = NO; | ||
| 136 | self.detailLbl.text = [NSString isEmpty:model.location] ? @"中国" : model.location; | 123 | self.detailLbl.text = [NSString isEmpty:model.location] ? @"中国" : model.location; |
| 137 | [self.detailLbl mas_makeConstraints:^(MASConstraintMaker *make) { | 124 | [self.detailLbl mas_makeConstraints:^(MASConstraintMaker *make) { |
| 138 | make.centerY.mas_equalTo(self.mas_centerY); | 125 | make.centerY.mas_equalTo(self.mas_centerY); |
| @@ -156,7 +143,6 @@ | @@ -156,7 +143,6 @@ | ||
| 156 | case MineInfoCellTypeSignature: | 143 | case MineInfoCellTypeSignature: |
| 157 | { | 144 | { |
| 158 | self.detailLbl.hidden = NO; | 145 | self.detailLbl.hidden = NO; |
| 159 | - self.thickLineV.hidden = NO; | ||
| 160 | self.lineV.hidden = NO; | 146 | self.lineV.hidden = NO; |
| 161 | NSString *signature = model.signature; | 147 | NSString *signature = model.signature; |
| 162 | if (signature) { | 148 | if (signature) { |
| @@ -168,17 +154,7 @@ | @@ -168,17 +154,7 @@ | ||
| 168 | make.right.equalTo(self.contentView).offset(-33); | 154 | make.right.equalTo(self.contentView).offset(-33); |
| 169 | make.left.equalTo(self.titleLbl.mas_right).offset(10); | 155 | make.left.equalTo(self.titleLbl.mas_right).offset(10); |
| 170 | }]; | 156 | }]; |
| 171 | - [self.thickLineV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 172 | - make.top.equalTo(self.contentView); | ||
| 173 | - make.left.right.equalTo(self.contentView); | ||
| 174 | - make.height.mas_equalTo(10); | ||
| 175 | - }]; | ||
| 176 | - [self.lineV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 177 | - make.bottom.equalTo(self.contentView); | ||
| 178 | - make.left.equalTo(self.contentView).offset(10); | ||
| 179 | - make.right.equalTo(self.contentView).offset(-10); | ||
| 180 | - make.height.mas_equalTo(1); | ||
| 181 | - }]; | 157 | + |
| 182 | } | 158 | } |
| 183 | break; | 159 | break; |
| 184 | default: | 160 | default: |
| @@ -233,14 +209,6 @@ | @@ -233,14 +209,6 @@ | ||
| 233 | return _lineV; | 209 | return _lineV; |
| 234 | } | 210 | } |
| 235 | 211 | ||
| 236 | -- (UIView *)thickLineV { | ||
| 237 | - if (!_thickLineV) { | ||
| 238 | - _thickLineV = [[UIView alloc] init]; | ||
| 239 | - _thickLineV.backgroundColor = RGB(242, 242, 242); | ||
| 240 | - } | ||
| 241 | - return _thickLineV; | ||
| 242 | -} | ||
| 243 | - | ||
| 244 | - (UIImageView *)QRCodeImgV { | 212 | - (UIImageView *)QRCodeImgV { |
| 245 | if (!_QRCodeImgV) { | 213 | if (!_QRCodeImgV) { |
| 246 | _QRCodeImgV = [[UIImageView alloc] init]; | 214 | _QRCodeImgV = [[UIImageView alloc] init]; |
CNLiveCMineModule/Classes/CNCSubMine/ViewController/CNMineCodeVC.m
| @@ -56,8 +56,9 @@ | @@ -56,8 +56,9 @@ | ||
| 56 | self.userModel = CNUserShareModel; | 56 | self.userModel = CNUserShareModel; |
| 57 | [self.iconView sd_setImageWithURL:[NSURL URLWithString:self.userModel.faceUrl] placeholderImage:kDefaultPicIcon(60)]; | 57 | [self.iconView sd_setImageWithURL:[NSURL URLWithString:self.userModel.faceUrl] placeholderImage:kDefaultPicIcon(60)]; |
| 58 | self.nameLabel.text = self.userModel.nickname; | 58 | self.nameLabel.text = self.userModel.nickname; |
| 59 | - self.localLabel.text = self.userModel.location; | ||
| 60 | - | 59 | + if (![self.userModel.location isEqualToString:@"未知"]) { |
| 60 | + self.localLabel.text = self.userModel.location; | ||
| 61 | + } | ||
| 61 | switch (_qrCodeType) { | 62 | switch (_qrCodeType) { |
| 62 | case CNQrCodeTypeDefualt: | 63 | case CNQrCodeTypeDefualt: |
| 63 | { | 64 | { |
CNLiveCMineModule/Classes/CNCSubMine/ViewController/CNMinePersonInfoController.m
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | [super viewDidLoad]; | 37 | [super viewDidLoad]; |
| 38 | // Do any additional setup after loading the view. | 38 | // Do any additional setup after loading the view. |
| 39 | self.title = @"个人资料"; | 39 | self.title = @"个人资料"; |
| 40 | - _data = [NSMutableArray arrayWithObjects:@"头像",@"昵称",@"性别",@"二维码",@"地区",@"详细地址",@"个性签名", nil]; | 40 | + _data = [NSMutableArray arrayWithObjects:@[@"头像",@"昵称",@"性别"],@[@"二维码",@"地区",@"详细地址"],@[@"个性签名"], nil]; |
| 41 | 41 | ||
| 42 | } | 42 | } |
| 43 | 43 | ||
| @@ -51,9 +51,12 @@ | @@ -51,9 +51,12 @@ | ||
| 51 | 51 | ||
| 52 | #pragma mark - UITableViewDataSource | 52 | #pragma mark - UITableViewDataSource |
| 53 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | 53 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { |
| 54 | + NSArray *arr = _data[section]; | ||
| 55 | + return arr.count; | ||
| 56 | +} | ||
| 57 | +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ | ||
| 54 | return _data.count; | 58 | return _data.count; |
| 55 | } | 59 | } |
| 56 | - | ||
| 57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | 60 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
| 58 | 61 | ||
| 59 | static NSString *identifierNormal = @"CNMineInfoCell"; | 62 | static NSString *identifierNormal = @"CNMineInfoCell"; |
| @@ -61,109 +64,165 @@ | @@ -61,109 +64,165 @@ | ||
| 61 | if (!cell) { | 64 | if (!cell) { |
| 62 | cell = [[CNMineInfoCell alloc] initForTableView:tableView withStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifierNormal]; | 65 | cell = [[CNMineInfoCell alloc] initForTableView:tableView withStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifierNormal]; |
| 63 | } | 66 | } |
| 64 | - switch (indexPath.row) { | 67 | + switch (indexPath.section) { |
| 65 | case 0: | 68 | case 0: |
| 66 | - {//头像 | ||
| 67 | - cell.type = MineInfoCellTypeIcon; | 69 | + { |
| 70 | + switch (indexPath.row) { | ||
| 71 | + case 0: | ||
| 72 | + //头像 | ||
| 73 | + cell.type = MineInfoCellTypeIcon; | ||
| 74 | + break; | ||
| 75 | + case 1: | ||
| 76 | + //昵称 | ||
| 77 | + cell.type = MineInfoCellTypeNick; | ||
| 78 | + break; | ||
| 79 | + case 2: | ||
| 80 | + //性别 | ||
| 81 | + cell.type = MineInfoCellTypeSex; | ||
| 82 | + break; | ||
| 83 | + | ||
| 84 | + default: | ||
| 85 | + break; | ||
| 86 | + } | ||
| 87 | + | ||
| 68 | } | 88 | } |
| 69 | break; | 89 | break; |
| 70 | case 1: | 90 | case 1: |
| 71 | - {//昵称 | ||
| 72 | - cell.type = MineInfoCellTypeNick; | 91 | + { |
| 92 | + switch (indexPath.row) { | ||
| 93 | + case 0: | ||
| 94 | + //二维码 | ||
| 95 | + cell.type = MineInfoCellTypeQR_code; | ||
| 96 | + break; | ||
| 97 | + case 1: | ||
| 98 | + //地区 | ||
| 99 | + cell.type = MineInfoCellTypeLocation; | ||
| 100 | + break; | ||
| 101 | + case 2: | ||
| 102 | + //详细地址 | ||
| 103 | + cell.type = MineInfoCellTypeAddress; | ||
| 104 | + break; | ||
| 105 | + | ||
| 106 | + default: | ||
| 107 | + break; | ||
| 108 | + } | ||
| 73 | } | 109 | } |
| 74 | break; | 110 | break; |
| 75 | case 2: | 111 | case 2: |
| 76 | - {//性别 | ||
| 77 | - cell.type = MineInfoCellTypeSex; | ||
| 78 | - } | ||
| 79 | - break; | ||
| 80 | - case 3: | ||
| 81 | - {//二维码 | ||
| 82 | - cell.type = MineInfoCellTypeQR_code; | ||
| 83 | - } | ||
| 84 | - break; | ||
| 85 | - case 4: | ||
| 86 | - {//地区 | ||
| 87 | - cell.type = MineInfoCellTypeLocation; | ||
| 88 | - } | ||
| 89 | - break; | ||
| 90 | - case 5: | ||
| 91 | - {//详细地址 | ||
| 92 | - cell.type = MineInfoCellTypeAddress; | ||
| 93 | - } | ||
| 94 | - break; | ||
| 95 | - case 6: | ||
| 96 | - {//个人标签 | ||
| 97 | - cell.type = MineInfoCellTypeSignature; | 112 | + { |
| 113 | + switch (indexPath.row) { | ||
| 114 | + case 0: | ||
| 115 | + //个人标签 | ||
| 116 | + cell.type = MineInfoCellTypeSignature; | ||
| 117 | + break; | ||
| 118 | + | ||
| 119 | + default: | ||
| 120 | + break; | ||
| 121 | + } | ||
| 98 | } | 122 | } |
| 99 | break; | 123 | break; |
| 100 | - | ||
| 101 | default: | 124 | default: |
| 102 | break; | 125 | break; |
| 103 | } | 126 | } |
| 104 | - cell.titleLbl.text = [_data objectAtIndex:indexPath.row]; | 127 | + cell.titleLbl.text = [_data objectAtIndex:indexPath.section][indexPath.row]; |
| 105 | cell.model = CNUserShareModel; | 128 | cell.model = CNUserShareModel; |
| 106 | return cell; | 129 | return cell; |
| 107 | 130 | ||
| 108 | } | 131 | } |
| 109 | 132 | ||
| 110 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | 133 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { |
| 111 | - if (indexPath.row == 0) { | 134 | + if (indexPath.section == 0 && indexPath.row == 0) { |
| 112 | return 80; | 135 | return 80; |
| 113 | } | 136 | } |
| 114 | - else if (indexPath.row == 1 || indexPath.row == 2 || indexPath.row == 4) { | ||
| 115 | - return 60; | ||
| 116 | - } | ||
| 117 | - else if (indexPath.row == 3 || indexPath.row == 5) { | ||
| 118 | - return 70; | ||
| 119 | - } | ||
| 120 | - else return 52; | 137 | + else return 60; |
| 121 | } | 138 | } |
| 122 | 139 | ||
| 123 | #pragma mark - UITableViewDelegate | 140 | #pragma mark - UITableViewDelegate |
| 141 | +- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForHeaderInSection:(NSInteger)section{ | ||
| 142 | + if (section == 0) { | ||
| 143 | + return 0; | ||
| 144 | + } | ||
| 145 | + return 10; | ||
| 146 | +} | ||
| 147 | +- (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ | ||
| 148 | + UIView *view = [tableView dequeueReusableCellWithIdentifier:@"headerView"]; | ||
| 149 | + if (!view) { | ||
| 150 | + view = [UIView new]; | ||
| 151 | + view.backgroundColor = RGB(242, 242, 242); | ||
| 152 | + } | ||
| 153 | + return view; | ||
| 154 | +} | ||
| 124 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | 155 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| 125 | [self.tableView qmui_clearsSelection]; | 156 | [self.tableView qmui_clearsSelection]; |
| 126 | - switch (indexPath.row) { | 157 | + switch (indexPath.section) { |
| 127 | case 0: | 158 | case 0: |
| 128 | { | 159 | { |
| 129 | - CNMinePersonIconController *iconVC = [[CNMinePersonIconController alloc] init]; | ||
| 130 | - [self.navigationController pushViewController:iconVC animated:YES]; | 160 | + switch (indexPath.row) { |
| 161 | + case 0: | ||
| 162 | + { | ||
| 163 | + CNMinePersonIconController *iconVC = [[CNMinePersonIconController alloc] init]; | ||
| 164 | + [self.navigationController pushViewController:iconVC animated:YES]; | ||
| 165 | + } | ||
| 166 | + break; | ||
| 167 | + case 1: | ||
| 168 | + { | ||
| 169 | + CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeNick content:CNUserShareModel.nickname]; | ||
| 170 | + [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | ||
| 171 | + } | ||
| 172 | + break; | ||
| 173 | + case 2: | ||
| 174 | + { | ||
| 175 | + CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeSex content:CNUserShareModel.gender]; | ||
| 176 | + [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | ||
| 177 | + } | ||
| 178 | + break; | ||
| 179 | + | ||
| 180 | + default: | ||
| 181 | + break; | ||
| 182 | + } | ||
| 183 | + | ||
| 131 | } | 184 | } |
| 132 | break; | 185 | break; |
| 133 | case 1: | 186 | case 1: |
| 134 | { | 187 | { |
| 135 | - CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeNick content:CNUserShareModel.nickname]; | ||
| 136 | - [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | 188 | + switch (indexPath.row) { |
| 189 | + case 0: | ||
| 190 | + { | ||
| 191 | + CNMineCodeVC *vc = [[CNMineCodeVC alloc] init]; | ||
| 192 | + [[BaseAppDelegate sharedAppDelegate] pushViewController:vc withBackTitle:@" "]; | ||
| 193 | + } | ||
| 194 | + break; | ||
| 195 | + case 1: | ||
| 196 | + { | ||
| 197 | + CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeLocation content:CNUserShareModel.location]; | ||
| 198 | + [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | ||
| 199 | + } | ||
| 200 | + break; | ||
| 201 | + case 2: | ||
| 202 | + { | ||
| 203 | + CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeAddress content:CNUserShareModel.address]; | ||
| 204 | + [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | ||
| 205 | + } | ||
| 206 | + break; | ||
| 207 | + | ||
| 208 | + default: | ||
| 209 | + break; | ||
| 210 | + } | ||
| 137 | } | 211 | } |
| 138 | break; | 212 | break; |
| 139 | case 2: | 213 | case 2: |
| 140 | { | 214 | { |
| 141 | - CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeSex content:CNUserShareModel.gender]; | ||
| 142 | - [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | ||
| 143 | - } | ||
| 144 | - break; | ||
| 145 | - case 3: | ||
| 146 | - { | ||
| 147 | - CNMineCodeVC *vc = [[CNMineCodeVC alloc] init]; | ||
| 148 | - [[BaseAppDelegate sharedAppDelegate] pushViewController:vc withBackTitle:@" "]; | ||
| 149 | - } | ||
| 150 | - break; | ||
| 151 | - case 4: | ||
| 152 | - { | ||
| 153 | - CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeLocation content:CNUserShareModel.location]; | ||
| 154 | - [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | ||
| 155 | - } | ||
| 156 | - break; | ||
| 157 | - case 5: | ||
| 158 | - { | ||
| 159 | - CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeAddress content:CNUserShareModel.address]; | ||
| 160 | - [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | ||
| 161 | - } | ||
| 162 | - break; | ||
| 163 | - case 6: | ||
| 164 | - { | ||
| 165 | - CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeSignature content:CNUserShareModel.signature]; | ||
| 166 | - [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | 215 | + switch (indexPath.row) { |
| 216 | + case 0: | ||
| 217 | + { | ||
| 218 | + CNMinePersonNicknameController *nickVC = [[CNMinePersonNicknameController alloc] initWithType:SettingTypeSignature content:CNUserShareModel.signature]; | ||
| 219 | + [[BaseAppDelegate sharedAppDelegate] presentViewController:nickVC animated:YES completion:nil]; | ||
| 220 | + } | ||
| 221 | + break; | ||
| 222 | + | ||
| 223 | + default: | ||
| 224 | + break; | ||
| 225 | + } | ||
| 167 | } | 226 | } |
| 168 | break; | 227 | break; |
| 169 | 228 |
Example/CNLiveCMineModule/CNLIVEAppDelegate.m
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | 28 | ||
| 29 | [super application:application didFinishLaunchingWithOptions:launchOptions]; | 29 | [super application:application didFinishLaunchingWithOptions:launchOptions]; |
| 30 | 30 | ||
| 31 | - [CNUserInfoManager manager].userInfoModel.uid = @"11174272";//@"10510277";//11174272//12857262 | 31 | + [CNUserInfoManager manager].userInfoModel.uid = @"396682";//@"10510277";//11174272//12857262 |
| 32 | 32 | ||
| 33 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | 33 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; |
| 34 | self.window.backgroundColor = [UIColor whiteColor]; | 34 | self.window.backgroundColor = [UIColor whiteColor]; |