Here is my code. My swift version is 4.
tableview.beginUpdates()
tableview.moveRow(at: IndexPath(row: indexPath.row, section: 0), to: IndexPath(row: 0, section: 2))
tableview.endUpdates()
There is the problem changing section of tableview. Because each section has other opacity and color, I want the opacity and color to change as soon as using moveRow(at:,to:).
But I can't find how do i. Please Help me!
Assuming you have a custom UITableViewCell class. You could write a function inside that class that manipulate the cells appearance. Let's say you have a bunch of outlets inside that class, you can make a function that changes those view elements. The alpha and the color etc.
Call this function on the cell inside cellForRowAtIndexPath method:
let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell", for: indexPath) as! MyCustomCellClass
cell.apperanceFunction(alpha: Double, background: UIColor)
at the specific section inside the if or switch I must assume you have. When you move the cell to that section cellForRowAtIndexPath should be called again and the function should be called on that specific cell. If it does not, you can always manually find that cell using the cellForRow(at: indexPath) function in your ViewController and call that function specifically.
Hope this makes sense... But It's a bit hard when this is the only code you provide.