I guess what you mean is that your tableView goes to the top but when it encounters category row it won’t go to the top but will stop a little bit below right?
Then solution is simple on OnRowTouch add if statment, for example : (pseudo code)
for i=1 , #rows
if row[i].isCategory then
if row[i].y > 600 then
stop Scrolling
end
end
end
If you want me to fix it for you submit your code since i am lazy bastard to implement this myself.
Ok say the top of my tableView is 0. The standard category row will stop when its top also reaches 0, but I want the category to stop at say 100 instead of 0.
Your method is similar to mine. The only way to get “rows” is by using
tableView.\_view.\_rows
correct?
If so, it does change the y value of the row when I print it, but it doesn’t change the actual position of the row.
Also, onRowTouch only gets called when you touch or release a row. I think the tableView listener would be a better function to put it in since it gets called every time the tableView moves
The tableView is set to mimic the iOS native tableView where categories scroll up and stick to the top until the next category replaces them. There are no controls to position this.
if self.\_currentCategory and self.\_currentCategory.y ~= self.\_currentCategory.contentHeight \* 0.5 + 100 then self.\_currentCategory.y = self.\_currentCategory.contentHeight \* 0.5 + 100 end
I guess what you mean is that your tableView goes to the top but when it encounters category row it won’t go to the top but will stop a little bit below right?
Then solution is simple on OnRowTouch add if statment, for example : (pseudo code)
for i=1 , #rows
if row[i].isCategory then
if row[i].y > 600 then
stop Scrolling
end
end
end
If you want me to fix it for you submit your code since i am lazy bastard to implement this myself.
Ok say the top of my tableView is 0. The standard category row will stop when its top also reaches 0, but I want the category to stop at say 100 instead of 0.
Your method is similar to mine. The only way to get “rows” is by using
tableView.\_view.\_rows
correct?
If so, it does change the y value of the row when I print it, but it doesn’t change the actual position of the row.
Also, onRowTouch only gets called when you touch or release a row. I think the tableView listener would be a better function to put it in since it gets called every time the tableView moves
The tableView is set to mimic the iOS native tableView where categories scroll up and stick to the top until the next category replaces them. There are no controls to position this.
if self.\_currentCategory and self.\_currentCategory.y ~= self.\_currentCategory.contentHeight \* 0.5 + 100 then self.\_currentCategory.y = self.\_currentCategory.contentHeight \* 0.5 + 100 end