無(wú)標(biāo)題文章

2016.4.20

/*

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *cellid = @"cellid";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellid];

if (cell == nil) {

cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellid];

}

UIView *line = [[UIView alloc] initWithFrame:CGRectMake(20, 49, self.tableview.frame.size.width - 40, 1)];

line.backgroundColor = RGBCOLOR(200, 200, 200, 1);

[cell addSubview:line];

_titlelabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 17, 70, 16)];

_titlelabel.text = self.arr[indexPath.row];

_titlelabel.font = TextFontThinWithSize(10);

//? ? title.backgroundColor = [UIColor redColor];

[cell addSubview:_titlelabel];

CGFloat x = CGRectGetMaxX(_titlelabel.frame) + 30;

CGFloat width = self.tableview.frame.size.width - x - 42;

_rightlabel = [[UILabel alloc] initWithFrame:CGRectMake(x, 16, width, 16)];

//? ? rightlabel.backgroundColor = [UIColor redColor];

UIImageView *view = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_rightlabel.frame)-7, 19, 7, 12)];

UITextField *textfield = [[UITextField alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_rightlabel.frame)-140, 17, 140, 17)];

textfield.placeholder = @"(字?jǐn)?shù)在10字以內(nèi))";

textfield.textAlignment = NSTextAlignmentRight;

textfield.delegate = self;

if(indexPath.row == 0) {

//? ? ? ? _rightlabel.text = @"啪啪閘北店";

_rightlabel.textColor = RGBCOLOR(128, 128, 128, 1);

_rightlabel.font = TextFontThinWithSize(10);

_rightlabel.textAlignment = NSTextAlignmentRight;

[cell.contentView addSubview:_rightlabel];

} else if (indexPath.row == 6) {

[cell addSubview:textfield];

} else if (indexPath.row == 7) {

//? ? ? ? line.isHidden = YES;

[line setHidden:YES];

} else {

//? ? ? ? _rightlabel = [[UILabel alloc] initWithFrame:CGRectMake(x, 16, width - 15, 16)];

//? ? ? ? _rightlabel.width = width - 15;

_rightlabel.textAlignment = NSTextAlignmentLeft;

view.image = [UIImage imageNamed:@"icon_youjiantou"];

[cell addSubview:view];

[cell addSubview:_rightlabel];

}

cell.selectionStyle = UITableViewCellSelectionStyleNone;

cell.backgroundColor = RGBCOLOR(230, 230, 230, 1);

return cell;

}

*/

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容