Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString *CellIdentifier = @"Cell";
- cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil)
- {
- cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
- }
- cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
- cell.textLabel.font = [UIFont fontWithName:@"Helvetica" size:15];
- cell.textLabel.text =[passarray objectAtIndex:indexPath.row];
- if(indexPath.row ==1){
- buybtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
- buybtn.frame = CGRectMake(90, 0 , 120, 44);
- buybtn.tag = indexPath.row;
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- buybtn.backgroundColor = [UIColor redColor];
- [buybtn setTitle:@"Buy" forState:UIControlStateNormal];
- [buybtn addTarget:self action:@selector(button1:) forControlEvents:UIControlEventTouchUpInside];
- [cell.contentView addSubview:buybtn];
- [AVAudioPlayer instancesRespondToSelector:@selector(stopAudio:)];
- }
- else
- {
- cell.userInteractionEnabled = YES;
- }
- /* if(indexPath.row ==1)
- {
- buybtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
- buybtn.frame = CGRectMake(90, 0 , 120, 44);
- buybtn.tag = indexPath.row;
- // cell.selectionStyle=UITableViewCellSelectionStyleNone;
- buybtn.backgroundColor = [UIColor redColor];
- [buybtn setTitle:@"Buy" forState:UIControlStateNormal];
- [buybtn addTarget:self action:@selector(button1:) forControlEvents:UIControlEventTouchUpInside];
- [cell.contentView addSubview:buybtn];
- }
- */
- return cell;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement