iOS 8: Remove Underline from UITableViewRowAction

Question!

I've been banging my head against the wall with this one, so maybe someone here has done this before.

Anyway, I'm trying to change how the delete button looks in my UITableView, and I've got it mostly figured out. I'm changing it by setting the background Color to a UIImage of what I actually want it to look like.

Apparently, though, a UITableViewRowAction has a faint grey line under it, and I can't figure out how to make this disappear. Any pointers would be greatly appreciated. There's a link to what I'm talking about here:

enter image description here

Thank you very much!



Answers

Try this on cellForRowAtIndexPath Method

for iOS lower versions

 if(indexPath.row != self.newCarArray.count-1){
   UIImageView *line = [[UIImageView alloc] initWithFrame:CGRectMake(0, 44, 320, 2)];
   line.backgroundColor = [UIColor redColor];
   [cell addSubview:line];
  }

for iOS 7 upper versions

 if (indexPath.row == self.newCarArray.count-1) {
    cell.separatorInset = UIEdgeInsetsMake(0.f, 0.f, 0.f, cell.bounds.size.width);
 }
By : S R Nayak


This video can help you solving your question :)
By: admin