Does UITableView have a callback for when it is done loading ALL cells?

I find it very diffcult to change UIActivityIndicator on and off for data loading into a table. I set it on and then call "reload data" on my tableView and then turn it back off. I dont think that is correct, because reload data will return immediately, it doesnt block until al the data is loaded correct? So a better way it to check for a callback when all the cells are loaded?
How are you guys doing this?

The table isn't going to load all cells anyway.
Say you have a 100-item table of which 6 cells are visible at a time. The table view will only use tableView:cellForRowAtIndexPath: to create 6 or 7 cells.
Later on, if the user scrolls, the table view will call tableView:cellForRowAtIndexPath: some more, for the newly visible cells.
If the table view held on to every cell once it had been loaded, more and more cells would gradually get allocated until all 100 cells were in existence and holding data. That would use up a lot of memory. (What if the table has 10,000 cells?)
If the table view did the standard thing of calling \[release\] on a cell as soon as it didn't need it, memory wouldn't get used up but a lot of time would be wasted allocating and deallocating.
So the table view has a list of "cells I have but don't really want". When they encourage you to call dequeueReusableCellWithIdentifier: in your tableView:cellForRowAtIndexPath: routine, they're effectively saying "when the table is asking you for a cell for a given table entry, ask the table if it's got any unwanted cells to give you, before you go off and allocate a new one".
As far as your question is concerned, this means that the table never really finishes loading. It'll only load 6 or 7 cells at a time, and when the user scrolls, it'll load some more. Depending how you've written tableView:cellForRowAtIndexPath:, it may only ever have 6 or 7 cells in memory at a time.
It all depends what you want. If you want your activity indicator to say "I am working on giving you a display but what you see on the screen isn't what you're ultimately going to get", then
(1) Get each individual cell to start its filling-itself-with-visible-data process when you allocate/reuse the cell in tableView:cellForRowAtIndexPath:. Give the cell a unique visible appearance when you do this. When the load process is complete, get the cell to call setNeedsDisplay so that it can get repainted with the real data. The user's experience will be of a table that appears instantly, each cell with an activity indicator in it, and the activity indicators then disappear as soon as each cell finishes its work. It will look rather nice.
Or (2) do much the same, but get each cell to increment a global "loads in process" counter when it is born/reborn, and decrement it when its data have arrived. Then use that global counter to control a single UIActivityIndicator.
The key in both cases is for cell creation to be fast, and the actual loading of data to the cells (if it's slow) to be done separately.

Similar Messages

  • I have a late 2008 white macbook.  I have a mini dvi to hdmi adapter, and a hdmi cord.  My cannot get my MB to detect an external monitor.  Nothing happens when plugged in.  Also, my display settings does not have an option for mirroring or arrangment tab

    I have a late 2008 white macbook.  I have a mini dvi to hdmi adapter, and a hdmi cord.  My cannot get my MB to detect an external monitor.  Nothing happens when plugged in.  Also, my display settings does not have an option for mirroring or arrangment tab

    Yeah, I'm having the same exact problem - It seems that the thunderbolt minidisplay port is only able to output the analog VGA signal, not the digital signal to support DVI and HDMI. This is a bug that came up after installing 10.7.1. I bought my macbook air with 10.7 on it, upgraded it to 10.7.1 as soon as I got it, so I have never been able to use hdmi or dvi with my macbook air. This is an extremely frustrating problem for me, I used HDMI on a daily basis with my PC. I have spent many hours at the genius bar running diagnostic tests so Apple can get as much information as possible to create a fix for this problem. I have been emailing tech support for 3 or so weeks now, they keep saying that they are working on a fix and it should be out soon, but 10.7.2 has come and gone and I still have no HDMI functionality with my MacBook Air!

  • I am using photoshop cc 2014.2 And when I use save for Web it gives me a dialog box that says it is using Latin characters I've never seen this before. Does anyone have an answer for this problem or do I need to go back to the older version of Photoshop.

    I'm using Photoshop cc 2014.21 I you save for Web and dialog box comes up that says that Photoshop is using Latin characters and that servers cannot recognize Latin characters in webpages and you may have trouble viewing these pages does anyone have an answer for this problem?

    What Firefox version is currently installed on the computer?
    You can find the full version of the current current Firefox release (37.0.2) in all languages and all operating systems here:
    *https://www.mozilla.org/en-US/firefox/all/
    If you have a very old Firefox version then you could consider to uninstall that version to clean up existing registry keys (especial the uninstall key).
    Make sure NOT to remove "personal data" when you uninstall Firefox, because that will remove all profile folders and you lose personal data like bookmarks and passwords including data in profiles created by other Firefox versions.
    Check the Firefox program folder and remove the Firefox program folder if there are still files left in it.
    *(32 bit Windows) "C:\Program Files\Mozilla Firefox\"
    *(64 bit Windows) "C:\Program Files (x86)\Mozilla Firefox\"
    It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other personal data are stored in the Firefox profile folder and won't be affected by an uninstall and (re)install, but make sure NOT to remove personal data when you uninstall Firefox as that will remove all Firefox profile folders and you lose your personal data.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • When I try to install PSE11, I keep getting error 1935, does anyone have a solution for this problem

    When I try to install PSE11, I keep getting error 1935, does anyone have a solution for
    this problem?

    This thread from the Premiere Elements forum may help:
    http://forums.adobe.com/thread/1286807?tstart=0

  • WHY WHEN I OPEN UP iTUNES DOES IT HAVE TO SCAN FOR MUSIC THEN I LOSE ALMOST EVERY **** SONG?!?!?!?!?!?

    Why the **** is iTunes 11 so ****? I like every bit of how it looks good and new options, the thing i despise, cringe, shout and get angry about is WHY WHEN I OPEN UP iTUNES DOES IT HAVE TO SCAN FOR MUSIC THEN I LOSE ALMOST EVERY **** SONG?!?!?!?!?!? It is far to annoying to have to re-enter all my albums and music, pictures, names... etc. etc. why can't it be the usual open iTunes and listen to my playlists?

    From the now playing screen, bring up the scrubber bar(tap the screen):
    A small icon that looks like two circular arrows is on the left side below the scrubbing bar. Tap this icon once to repeat the album. The icon will turn blue when repeat is activated. Tap the icon again to repeat the current song. The icon will change to show the number 1 inside a blue circle. Touch the icon a third time to cancel any repeat. The icon will turn white when it's deactivated.

  • Visual Studio 2012 SharePoint Project Error : The partial project item type does not have a value for this property

    Hi,
    I am getting this error from visual studio 2012 whenever i try to create the following project types:
    - Workflow Custom activity
    - Web parts
    The error is as mentioned below
    "The partial project item type does not have a value for this property"
    Due to this the when I add above type of items in my project, they show a red cross icon against them.
    Please let me know If have you any solution?

    Hi
    I had same issue. Below is the solution
    Installing
    "Visual Studio 2012 Update 3" usually solves this problem. (You can download it through microsoft's official site at
    "http://www.microsoft.com/en-in/download/details.aspx?id=39305")
    Hansraj Rathva

  • Does anyone have any suggestions for Ad blocking? I'm getting a lot of pop up ads while using Facebook from Safari.

           I'm getting a lot of pop up ads. mostly while using  Facebook. I'm running Safari on a Macbook Pro running Yosemite. Does anyone have any suggestions for an Ad blocker. I don't see anything in the App store.
          I can't swear to it but I don't recall this being a problem pre-Yosemite. I could be wrong. I haven't been real active on Facebook until recently. I see some third party apps out there but am alway wary of non approved software.
         Thanks
         Ron

    You may have installed the "VSearch" trojan. Remove it as follows.
    Malware is always changing to get around the defenses against it. These instructions are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data before proceeding.
    Step 1
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot," "Trovi," or "Conduit" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    Reset the home page and default search engine in all the browsers, if it was changed.
    Step 2
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "com.vsearch.agent.plist" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /System/Library/Frameworks/VSearch.framework
    ~/Library/Internet Plug-Ins/ConduitNPAPIPlugin.plugin
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    The problem may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the Internet criminal behind VSearch has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing has not done so, even though it's aware of the problem. This failure of oversight has compromised both Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Does anyone have a cure for the following error running on Windows, "The procedure entry point sqlite3_wal_checkpoint could not be found located in the dynamic link library SQLite.dll.

    Does anyone have a cure for the following error running on Windows, "The procedure entry point sqlite3_wal_checkpoint could not be found located in the dynamic link library SQLite.dll.

    I have searched my computer for that file SQlite3.dll and also file QTCF.dll and I cannot find either one when I search my whole computer for it.  I cannot fix this!  I deleted Itunes and every time I try to download it, it goes through all this download till the end when it says that iTunes.exe-entry point now found and that Procedure entry point message comes up.  HELP!  This is driving me crazy.  How can I get itunes to work again when I can't find the danged .dll file to remove, move or rename!?!?!??

  • PLEASE HELP! Does anyone have the software for the old 20" cinema display?

    CAN ANYONE HELP?! Does anyone have the software for the old 20" cinema display model number M88932M/A? (brought early 2004- the version with no control button) I can't find my manual or software CD for my Apple Display anywhere - I can't remember if the screen was even shipped with them. Because do not have this software I can't control anything to do with my screen e.g the brightness/contrast etc.
    I can't find the link to download the software anywhere on the apple website! (I have spent hours looking). If you know the link, I'd be really grateful if you could email it to to me. Or does anyone have the software CD that I could borrow and then return immediately? Please get in touch if you do. Many thanks! email address: [email protected]

    Hi Nathan,
    Thank you so much that was very kind of you! You must have the same screen as me as mine is the clear fronted on too.
    I have downloaded the OS X version, When I went to install it, but I got a message up saying the software was already on my machine. It must part of the Tiger OS, becuase I haven't installed anything.
    I have a quick question for you . . . Should the software you put up for me enable to me run "Display Calibrator Assistant" in the System preference or is the software from the CD hidden something else and I am looking in the wrong place on my mac?
    I did read somewhere when I got under the apple menu there should be a "monitor" menu - I don't have that but that maybe a classic thing?
    Many thanks for you help I really appreciate it!
    Purplecrazymoo

  • Does EchoSign have a solution for forms that require more than 1 signature?

    We have a form that requires the employee to sign and the supervisor.  The employee and the supervisor are often at 2 different locations.  We want to use formscentral for the form.  We would like the form to go to the supervisor for their signature before it comes to our department.  Does echosign have a solution for form and signature process flow?

    If you are sending a document to be signed by multiple signers you will want to define the Role for the various fields. The Role is who is allowed  to interact with that field. By default the signers will sign in the order that their email addresses were entered into the To: field. It is important to keep this workflow in mind when setting up the signature fields.
    When a signature field is placed you can set the Role for that field (who can click to sign). Right click on the signature field for the 1st signer and select edit. This will open a window where you can define the options for that field. Select the 1st signers email address in the drop down list for the Role: field.
    Repeat this step to associate all the other signature fields for the other signers.
    Please watch this short tutorial video to see how to author a multi-signer document:
    https://www.echosign.adobe.com/en/misc/echosign-how-to-series-sending-to-multiple-signers. html

  • Since I have connected my iPad with the MacBook through ICloud I have problems in Preview of opening PDF- and JPG-files. Does anyone have a solution for this?

    Since I have connected my iPad with the MacBook through ICloud I have problems in Preview of opening PDF- and JPG-files. Does anyone have a solution for this?

    I'm not sure I understand the connection between iCloud and this problem.  Is it simply a problem of coincidental timing (ie, the problem happened after you set up iCloud)?  If so, there's almost certainly no connection between these two events.
    Where are you getting the files you're trying to open, and what specifically happens when you try to open them?

  • Does Adobe have a 'fix' for the problem of desktop icons turning into Adobe icons after a previous Adobe update?

    After a previous Adobe update, all of my desktop icons turned into Adobe icons. I'm not sure how it happened - I just looked away from my computer for a second and when I looked back, there they were!
    Does Adobe have a 'fix' for this problem?  I have had to uninstall Adobe in order to use my other programs, but I teach and I use Adobe documents quite often, so now I can't open those.

    Try some of the solutions here ---> Application, file icons change to Acrobat/Reader icon

  • HT4623 i just bought an iPad from a friend. I think is generation 1 or 2 not sure where to look for this. Bottom line, I would like to update it to iOS7. Is this possible?  It does not have the option for software update.

    i just bought an iPad from a friend. I think is generation 1 or 2 not sure where to look for this. Bottom line, I would like to update it to iOS7. Is this possible?  It does not have the option for software update.

    Identify Your iPad
    http://www.ifixit.com/Info/ID-your-iPad
    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 7.0.4. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    You can no longer update to iOS 6.x, or down grade the iOS.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and antivirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update an iPad (except iPad 1) to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
    Tip 2 - If you're updating via wifi, place your iPad close to your router to preclude getting a corrupted download.
    How to Upgrade to iOS 7
    The iOS 7.0 update requires around 2.5 GB of storage space, so if your iPad is almost full, you may need to clear up some space. You can check your available space in Settings -> General -> Usage.
    There are two ways to upgrade to iOS 7: You can use your Wi-Fi connection, or you can connect your iPad to your PC and update through iTunes. We'll go over each method.
    To upgrade using Wi-Fi:
    Note: If your iPad's battery is under 50%, you will want to plug it into your charger while performing the update.
    Go into the iPad's Settings.
    Locate and tap "General" from the menu on the left.
    The second option from the top is "Software Update". Tap this to move into the update settings.
    Tap "Download and Install". This will start the upgrade, which will take several minutes and will reboot your iPad during the process. If the Download and Install button is grayed out, trying clearing up some space. The space required by the update is mostly temporary, so you should gain most of it back after iOS 7 is installed.
    Once the update is installed, you may have to run through the initial steps of setting up your iPad again. This is to account for new features and settings.
    To upgrade using iTunes:
    First, connect your iPad to your PC or Mac using the cable provided when you purchased your device. This will allow iTunes to communicate with your iPad.
    You will also need the latest version of iTunes. Don't worry, you will be prompted to download the latest version when you launch iTunes. Once it installs, you may be asked to setup iCloud by logging into your iTunes account. If you have a Mac, you may be prompted on whether or not you want to enable the Find my Mac feature.
    Now you are ready to begin the process:
    If you upgraded iTunes earlier, go ahead and launch it. (For many, it will launch automatically when you plug in your iPad.)
    Once iTunes is launched, it should automatically detect that a new version of the operating system exists and prompt you to upgrade to it. Choose Cancel. Before updating, you will want to manually sync your iPad to make sure everything is up to date.
    After canceling the dialog box, iTunes should automatically sync with your iPad.
    If iTunes doesn't automatically sync, you can manually do it by selecting your iPad within iTunes, clicking on the File menu and choosing Sync iPad from the list.
    After your iPad has been synced to iTunes, select your iPad within iTunes. You can find it on the left side menu under Devices.
    From the iPad screen, click on the Update button.
    After verifying that you want to update your iPad, the process will begin. It takes a few minutes to update the operating system during which time your iPad may reboot a few times.
    After updating, you may be asked a few questions when your device finally boots back up. This is to account for new settings and features.
     Cheers, Tom

  • HT5463 I turn the do not disturb button on and I am not given any options for setting or calls allowed. Does anyon have a fix for this?

    I turn the do not disturb button on and I am not given any options for setting or calls allowed. Does anyon have a fix for this?

    Do Not Disturb and Notifications
    Push notifications appear in Notification Center and alert you to new information, even when the
    associated app isn’t running. Notifications vary by app, but may include text or sound alerts, and
    a numbered badge on the app icon on the Home screen.
    Turn off all notifications: Go to Settings and turn on Do Not Disturb. When it’s turned on and
    iPhone is locked, all notifications and calls are silenced, but alarms will still sound. You can set the
    following options in Settings > Notifications > Do Not Disturb:
    • Automatically turn on Do Not Disturb: Set the starting and ending hours for when you don’t
    want to be disturbed. iPhone turns on Do Not Disturb during these hours each day.
    • Allow some phone calls during Do Not Disturb: When Do Not Disturb is on, calls are silently sent
    to voice mail. To allow some callers to ring through, tap Allow Calls From. You can allow calls
    from your Favorites list or other Contacts groups you define. For information about Favorites,
    see Chapter 25, Contacts, on page 100.
    • Allow persistant callers to ring through: Turn on Repeated Calls. If the same caller (based on
    their Caller ID) calls you twice within three minutes, iPhone will ring.
    Turn an app’s notifications on or off: Go to Settings > Notifications. Tap an item in the list, then
    turn notifications on or off for that item. Apps that have notifications turned off appear in the Not in Notification centre

  • Nokia n900 - does it have a video light when you a...

    Nokia n900 - does it have a video light when you are recording video
    Message Edited by j2001m on 10-Nov-2009 04:07 AM
    Message Edited by j2001m on 10-Nov-2009 04:08 AM

    I don't see why not, I'm pretty sure the N97 uses the lights on the Dual LED flash for video - so I'm pretty sure the N900 would just use those. To not make use of them would be kinda stupid..

Maybe you are looking for

  • HT1600 My apple tv stopped working during a movie. I tried to reload software .it deleted it, but won 't reload it.

    My apple tv stopped working during a movie. I tried to reload software .it deleted it, but won 't reload it.

  • Can't get Transparent background in Adobe Flash Professional CS4

    I'm wanting to create a moving object that will be exported into a tv commercial. Object has already been created in Adobe Illustrator, and now will be dropped into flash for adding movement. The destination commercial will be created in Sony Vegas,

  • Save real-time data

    Hello! I'm at the begin with LabView. I'd like to verify my signal with an oscilloscope. After this, when i active a light, the power of this signal must be save. I have found the oscilloscope VI. I'm tring to modify it in order to save, when it's ne

  • Control propogation of adjustment layer?

    hi there, quick photoshop analogy to get to my question: in photoshop, you can control the propogation of an adjustment layer located within a group by changing the default blend mode of the group from "pass through" to "normal" is there some similar

  • Trouble synching apps

    i have recently bought a 32gb itouch off of my friend, i have synched music from my itunes library fine. However his apple ID keeps popping up on my itouch even though i have already signed in on the app store, also i am unable to sync the apps in my