无标题文章

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 = @"(字数在10字以内)";

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;

}

*/

你可能感兴趣的:(无标题文章)