Posts

Showing posts from December 5, 2018

UITableView multiple cell selection from ONE customTapGestureRecognizer

Image
up vote -2 down vote favorite My problem is that right now in my UITableViewDataSource, when I call a function to change the color of the background of the cell AND call another function, several other cells are having their colors changed too. So, when I press my "like" button on a cell, not only is my cell getting highlighted, cells farther down (Have to scroll down), also have their cell highlighted. If I scroll fast down and up, my originally highlighted cell is no longer highlighted (SOMETIMES) too. I'm currently using a UITableViewDataSource, and inserting into rows using their configuration cellForRowAt. I'm also dequeuing my preference cells with tableview.dequeueReusableCell. Here is my code: func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let...

Remove extra curly braces for def'ed argument

Image
up vote 1 down vote favorite I am trying to combine the answers of Remove extra curly braces and def'ed plain-text argument behaves differently from plain text, and I am failing. Here's an MWE: documentclass{article} makeatletter usepackage{seqsplit} newcommand{dosomething}[1]{expandafterseqsplitexpandafter{@firstofone#1}} begin{document} defkong{looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong} defkongg{kong} defkonggg{{looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong}} % works dosomething{looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong} % works, too expandafterdosomething{expandafterkong} % works with extra {...} dosomething{{looooooooooooooooooooooooooooooooooo...