I'm making a navigation based application. When the user selects a row on the table view, it goes to the next table. However, depending on how many entries are on the table view, this can be instantaneous, or it can take a while.
Something needs to be shown to the user that the program is working and is not frozen. I was thinking of bringing up a different view with a progress bar on it, but that won't be useful for situations when the next table will load immediately.
I was also thinking of overlaying some kind of progress meter on top of the first table, but instead of a bar it's a circle. Is that possible?
What's the best way to handle this?
Take a look at this example http://github.com/matej/MBProgressHUD. Hope it helps.
Related
I'm writing a logging application which is using a QListView with custom QStandardItems to display the log data. I have implemented filters in the app that will color the matching rows differently and when changing a filter I have to manipulate every item in the list, which after a while gets very slow. I'm not sure what's causing this yet, but I wonder if it could be that it repaints after every item change. If that is the case, could I somehow tell QT to not repaint until I'm done manipulating all the items?
Thanks for any help!
For helping others, I could add that I fixed this by implementing my own view that handles the paint event itself and only paints the rows currently visible on screen. This makes it extremely fast and no internal QT view seem to be able to do something similar.
I am having a lot of Items(Say 100), I want the user to swipe right and left to see the detailed description of Items.
I thought of using a Pivot Control, but that is causing performance problem because of too many items.
Now, In order to make it lightweight, I want to implement the scenario in a Single page and change the DataContext when the user swipes. I know that swipe gestures can be detected from the toolkit project. Now, I want to animate my grid, when swipe gestures happening exactly like Pivot Page or a Normal Scroll behaviour. I searched a bit, and found that it can be done by creating StoryBoard animation but I am less experienced in that. Any code sample will be helpful. Thanks.
i think you can make archive page and when the user select the item jump to the pivot with selected index
Small possible code sample.
In your page code behand, initialize a Dictionary ( where int is the position and pivotitem the pivot )
Load it up with 3 pivots at start
Than if your Pivot control is called AllPivots, do AllPivots.Items.Add(pivotItem) for each pivot inside the dictionary.
Next thing to do is detect how the user is changing the pivots, so if the selectedindex changes of AllPivots, see if the user advances, if so, add the next pivot into the dictionary and also to the AllPivots.Items and remove the first pivot with AllPivots.Items.Remove.
Each time the user goes back or forward look up the next or previous pivot in the dictionay and perform the correct actions or create new pivots on the fly.
Like I said a dirty hack, but maybe worth a try
Initially I was under the impression that it uses the table row slideup/down animations while inserting/deleting new rows but I doubt if it's doing that as it does it so fluidly even with thousands of items in the list (otherwise it would take a lot of time for the deletions/insertions to work).
Am I right in my assumption that it's simply attaching a new instance of the News list at the bottom of the screen, shrinking the above one while the one at the bottom expands to fill up space?
UPDATE:
Please see this video of what I mean: http://dl.dropbox.com/u/4960327/ReederAnim.mov
I can not tell you exactly how Silvio Rizzi made this, but as you see in the playback, a list view is added behind the shown list view, and the front list view fades out (.alpha = 0.0;) while the list view behind it expands its height per row.
When you desicate it frame by frame it becomes quite clear what he does, and it is really not that advanced. But I have to admit, with the white "milky" polished interface, it looks quite neat.
In addition, you can see that while animating, the background list view only renders the top 7 entries (hopefully calculated by dividing the view height with the average height of the cells shown) making the list view quick to load. Then afterwards, he can load an extended array of cells once you start scrolling, or in a background thread starting once the animation is complete.
I have some 10 rows in my table. I can able to scroll the table view, but the scroll is not fixed. when i leave the scroll the table is again hiding the last row. Can any one help me out in this issue.
Thanks in advance
You need to adjust the size of table view and also set the autosizing in inspector from IB.
It is hard to give an opinion without any code, but have you checked that your Table is not larger that the size of the view? Maybe the bottom of your Table is just displayed outside the window.
If not, you shall post the code of your controller methods to get some more accurate help.
Are you using interface builder or everything is defined in the code?
I need to display a progress of loading of item's children. Please advise how to implement a progress indicator like it's done in Mail application:
(source: quicksnapper.com)
P. S. Here a source code of using indicator sub-views: http://snippets.dzone.com/posts/show/7684
This is harder than it should be, because Apple does not provide an NSProgressIndicatorCell. While table and outline views support the idea of custom cells being displayed within them, they are not set up to easily support custom subviews.
So the trick becomes, how do you get a a complete NSProgressIndicator view to display and animate at the desired spot in your window, without the ability to actually install it in the table view row?
The trick I've used is to literally install the NSProgressIndicator as a subview of the outline or table view itself. To find the location to add the subview, so it looks like it's "in the row", use the frameOfCellAtColumn:row: method. You can then position your progress indicator within that location of the outline view. When you're done spinning the progress indicator, you probably don't want to show it any more, so just remove it from its superview and discard it.
You will want to make sure you set the required autosizing flags on the progress indicator, so that it floats in the correct direction when/if your outline view is resized.
I'm sure there are other hacks like this to achieve the desired end result. I don't think there is any super-clean way to accomplish this trick.
Vienna is an open-source (Apache license) feed reader that has this in its source list. You should look at the Vienna source code to see how they did it.
Viena's implementation is not perfect. Add a feed to a folder then as it is loading and the progress indicator is busy collapse that folder. You will see the progress indicator still running in the same location.