Friday, 15 April 2011

ios - What is the maximum recommended file size I should load using NSData dataWithContentsOfURL? -



ios - What is the maximum recommended file size I should load using NSData dataWithContentsOfURL? -

the ios documentation datawithcontentsofurl (https://developer.apple.com/library/mac/documentation/cocoa/reference/foundation/classes/nsdata_class/reference/reference.html#//apple_ref/occ/clm/nsdata/datawithcontentsofurl:) suggests

"this method ideal converting data:// urls nsdata objects, , can used reading short files synchronously"

how long short file in case?

it blocks main thread because mode of communication in synchronous fashion. so, before user identify block in ui, should download file. should not more few kbs. there no such defined rule same. improve practice , 1 should go connection apis if file size greater 10 kbs.

ios nsdata

No comments:

Post a Comment