Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString* identifir = @"Cell";
- static NSString* detailIdentifier = @"detailCell";
- if([self.checkedPaths count] == 0 && !(self.isOpenDoctors))
- {
- StuffCell* cell = [tableView dequeueReusableCellWithIdentifier:identifir];
- UIView *bgColorView = [[UIView alloc] init];
- bgColorView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"checktt@2x.png"]];
- [cell setSelectedBackgroundView:bgColorView];
- if(cell == nil)
- {
- cell = [[StuffCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifir];
- }
- [cell setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"uncheck@2x.png"]]];
- cell.labelStuff.text = [self.mainArray objectAtIndex:indexPath.row+self.numberOfCheckedRow-self.numberOfCheckedRow];
- cell.imageArrow.image = [UIImage imageNamed:@"arrow_down@2x.png"];
- cell.labelStuff.textColor = [ViewController colorWithHexString:@"235977"];
- return cell;
- }
- else if (self.isOpenDoctors == YES && ![self.checkedPaths containsObject:indexPath])
- {
- StuffCell* cell = [tableView dequeueReusableCellWithIdentifier:identifir];
- if(cell == nil)
- {
- cell = [[StuffCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifir];
- }
- [cell setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"uncheck@2x.png"]]];
- cell.labelStuff.text = [self.mainArray objectAtIndex:indexPath.row];
- cell.imageArrow.image = [UIImage imageNamed:@"arrow_down@2x.png"];
- cell.labelStuff.textColor = [ViewController colorWithHexString:@"235977"];
- return cell;
- }
- else
- {
- DetailStuffCell* cell = [tableView dequeueReusableCellWithIdentifier:detailIdentifier];
- if(cell == nil)
- {
- cell = [[DetailStuffCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifir];
- }
- [cell setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"sotr@2x.png"]]];
- cell.labelDetail.textColor = [ViewController colorWithHexString:@"235977"];
- cell.labelDetailTwo.textColor = [ViewController colorWithHexString:@"235977"];
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- [cell.avaView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"ava_mini@2x.png"]]];
- Doctor* doctor = [self.mainArray objectAtIndex:indexPath.row];
- cell.avaImage.image = [UIImage imageNamed:doctor.avatarName];
- cell.labelDetail.text = doctor.name;
- cell.labelDetailTwo.text = doctor.aboutHim;
- // cell.userInteractionEnabled = NO;
- // cell.labelDetail.text = [self.mainArray objectAtIndex:indexPath.row];
- // NSLog(@"%@",cell.labelDetail.text);
- return cell;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement