UITableView stops updating content while scrolling through view?

Corey Smith

I have a UITableView with which works fine and updates fine. I also have a timer that updates each UITableView label and a progress view, when the user is scrolling the table view it stops updating/refreshing the content (labels and progress view) in the UITableView until they are done scrolling.

In addition to the content not updating I have found that when the user is scrolling the entire app hangs. I have two timers and I put print statement in both, but neither prints when the user is scrolling. I have not been able to find a swift or swift 2 solution to this.

macbirdie

This is completely unrelated to Swift whatsoever.

You probably scheduled the NSTimer using the default method, which results in adding it to a runloop in a way that it's not triggered while scrolling. You need to add it to the main runloop with a NSRunLoopCommonModes mode instead.

E.g.

let timer = NSTimer(timeInterval: 1.0, target: self, selector: #selector(update), userInfo: nil, repeats: false)
NSRunloop.mainRunLoop().addTimer(timer, forMode: NSRunloopCommonModes)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Infinite scrolling Flipview updating content while flipping

From Dev

View is getting replaced while Scrolling in UITableView

From Dev

iOS: label stops updating when user scrolls through table view

From Dev

iOS: label stops updating when user scrolls through table view

From Dev

UITableView stops scrolling when adding new rows

From Dev

Issue: iOS UITableView scrolling stops other task

From Dev

Show and hide Action bar while scrolling view pager content

From Dev

Updating cursor rects immediately when scrolling stops

From Dev

content overlapping while scrolling

From Dev

UITableView prevent reloading while scrolling

From Dev

Repeated cells while scrolling uitableview

From Dev

Repeated cells while scrolling uitableview

From Dev

Move a view when scrolling in UITableView

From Dev

Error while updating the content

From Dev

Textview stops blinking after scrolling in Recycler View

From Dev

Offset appears in image content when scrolling UITableView

From Dev

UITableView choppy scrolling WITHOUT images or content fetching

From Dev

UITableView inserting section at top while scrolling

From Dev

Why UITableView cell overlap while scrolling?

From Dev

UITableView - cell images changing while scrolling

From Dev

UITableView not scrolling while adding on google mapView iOS

From Dev

UITableView inserting section at top while scrolling

From Dev

UITableView get the value of the section while scrolling

From Dev

Radio buttons get unselected while scrolling UITableView

From Dev

CustomCell images change while scrolling in UITableView

From Dev

Scrolling of iOS UITableView out of view visual errors

From Dev

scheduledTimerWithTimeInterval not updating timer method while scrolling?

From Dev

Datagrid not updating properly, updates while scrolling

From Dev

Scrolling column that stops scrolling

Related Related

  1. 1

    Infinite scrolling Flipview updating content while flipping

  2. 2

    View is getting replaced while Scrolling in UITableView

  3. 3

    iOS: label stops updating when user scrolls through table view

  4. 4

    iOS: label stops updating when user scrolls through table view

  5. 5

    UITableView stops scrolling when adding new rows

  6. 6

    Issue: iOS UITableView scrolling stops other task

  7. 7

    Show and hide Action bar while scrolling view pager content

  8. 8

    Updating cursor rects immediately when scrolling stops

  9. 9

    content overlapping while scrolling

  10. 10

    UITableView prevent reloading while scrolling

  11. 11

    Repeated cells while scrolling uitableview

  12. 12

    Repeated cells while scrolling uitableview

  13. 13

    Move a view when scrolling in UITableView

  14. 14

    Error while updating the content

  15. 15

    Textview stops blinking after scrolling in Recycler View

  16. 16

    Offset appears in image content when scrolling UITableView

  17. 17

    UITableView choppy scrolling WITHOUT images or content fetching

  18. 18

    UITableView inserting section at top while scrolling

  19. 19

    Why UITableView cell overlap while scrolling?

  20. 20

    UITableView - cell images changing while scrolling

  21. 21

    UITableView not scrolling while adding on google mapView iOS

  22. 22

    UITableView inserting section at top while scrolling

  23. 23

    UITableView get the value of the section while scrolling

  24. 24

    Radio buttons get unselected while scrolling UITableView

  25. 25

    CustomCell images change while scrolling in UITableView

  26. 26

    Scrolling of iOS UITableView out of view visual errors

  27. 27

    scheduledTimerWithTimeInterval not updating timer method while scrolling?

  28. 28

    Datagrid not updating properly, updates while scrolling

  29. 29

    Scrolling column that stops scrolling

HotTag

Archive