How to detect movement of table on WatchOS? - apple-watch

In table cell, I have a label that I have to update every second and this makes scroll very laggy... If I can now that user is making the table move, I could stop the timer that updates all the cells. Is there a way to do that?

Currently this is not supported on WatchOS 2.

Related

Select multiple rows in UITableView with dragging finger

I would like to ask if it is possible to select multiple cells by dragging my finger on the cells I want to select. For example when you are cropping a picture, you are dragging a line with your finger and I want to have a similar effect.
I can also consider using other UI elements rather than a UITableView, open to suggestions.
Thank you for your help.
You can put a transparent(view.backgroundColor = [UIColor clearColor]) overlay view above the table view when you want to select.
In this transparent view, you should set up a UIPanGestureRecognizer, and by watching events of this recogniser, especially the events for Began, Changed, Ended and Cancelled. The target object would know the range to select.

UIPickerView - Selects row too fast

I am currently using a UIPIckerView in my app to allow a user to select from a list of options. The problem is that there isn't enough of a delay when the user stops spinning the wheel and it is selecting a value before the user has a chance to scroll further down the list.
Is there a way to override the default behavior that selects the row as soon as the wheel stops spinning and the user removes their finger? I see Mobile Safari includes a "Done" button which would be great.
I can provide code if necessary (not sure how it would help).
Thanks!
You can add this manually; just add a done button to the view that holds the UIPicker, and have IT do whatever action you're currently performing in – pickerView:didSelectRow:inComponent:.
The UIPickerView automatically selects which ever row stops in the center. It does not work like a table but more like a popup menu. As such, you can't use a picker view like a button to call an action because it will trigger the moment the user stops moving it whether that represents their final choice or not.
Instead, as noted previously, you need a second control element (usually a button) to call the action that makes use of the pickerview's selection.

iPhone Slide Tap Delete

Does the slide tap delete (i.e., deleting a video in Videos app) come default when you make an iPhone vertical table? If not, how would I do that?
That comes as default when you make that table editable. All you have to do is implement the delegate functions to allow editing mode on the table, and of course place the editing button somewhere.

iPhone Dev: Get more data functionality in twitter iPhone clients?

I'm building an app (not necessarily a twitter client) and I'm trying to figure out how developers create the buttons above and below a table view where a user presses them to either reload newer data or reload older data into a table view. Does anyone know of any tutorials out there that does this or know of an easy way?
If you want fixed buttons, you can just make your table view not use the full screen and add the buttons in the space. If you want the buttons to scroll with the table view, you can add a header or footer view to the table and put your buttons inside that.
Check the Three20 project. I believe there's a tableview there that does that.
It's actually not that hard to add inline buttons to a tableview. First you check and see if there's actually more data to show. If so, you want to add 1 to the number of rows returned from the datasource. When asked to draw that last row you return a cell that contains "Press for more" caption as well as a hidden spinner instead of the standard cell that shows your normal data.
If the user presses that last button the table view handler turns on the spinner then fires off a network event. Once the network request completes the data is processed and added to the same tableview datasource that was used to draw the first table.
Now all you have to do is tell the tableview to reload itself and the new data will show up. If you want to limit the amount of data shown you can prune out N number of items from the head of the datasource before redrawing so the memory-use stays manageable.

How mimic delete specific row in a UITableView?

I have a list of things in a table view.
When a user tap a row, I increase score. I wish provide a way to clear the score for that row.
My first try is put the table in edit mode, show the delete button to that row and proceed. However, all the other rows get blocked and can't tap again the score or tap in the disclosure button.
So, obviously this is not the way. But then I don't see what to do. Any suggestion?
You could add a button to clear the row’s score as a subview of your table cell. I suppose you’d have to put it on the left side, though, since the disclosure button is on the right.