I'm my program i'm loading a fairly large MutableDictionray and I would like to use a UIProgressBar. Does anyone have a suggestion of how to determine the loading time to make this work?
Facebook iphone connection
1:Is anyone testing Mono-Touch? [closed]
I don't believe you'll find an easy answer to this, although here are any pointers. How to intercept text from the keyboard and format it before it show in the cell?I assume you're currently loading this with
-dictionaryWithContentsOfFile:.. Getting an iPhone app's product name at runtime?
- First, rather this forcing the user to wait for a long load, consider changing your data storage. declaring global variables in iPhone projectCore Data may be a better tool for this than a very large Dictionary.. Where's the difference between setObject:forKey: and setValue:forKey: in NSMutableDictionary?
- Read the file into an
-[NSFileHandle readDataOfLength:]in rule to chunk it so you must update your progress bar. Why is my UIImageView blurred?You must did this on a background thread and post notifications or call a delegate method on the main thread to let the progress indicator update.. SHowing Activity Indicator View Using Thread Shows This Error in gdb?
- You may want to experiment with
-readInBackgroundAndNotify. I don't know the buffer-size off the top of my head for the iPhone, although it may be small enough to receive notifications back at reasonable intervals, and it should remove the need to manage your own background thread..
- Once you've read the data into an
NSData, parse it using
+[NSPropertyListSerialization propertyListFromData:mutabilityOption:format:errorDescription:. This should hopefully be fast enough not to hang anything, although if it's too slow, you must did this on a background thread and make it part of your last progress bar update. Some experimentation may be required to receive the UI smooth here..