ios - Retrieve images from parse before UITableVIew has loaded? -



ios - Retrieve images from parse before UITableVIew has loaded? -

everything works fine except images in cell showing after disturbing delay. 0,3 seconds after tableview has finished loading. think it's pretty ugly show blank image short time...

how can create tableview show after images parse loaded (why not cache first?). or maybe create launch screen hold on longer time..? tableview initial view in app.

queryfortable

- (pfquery *)queryfortable { pfquery *query = [pfquery querywithclassname:self.parseclassname]; // if no objects loaded in memory, cache // first fill table , subsequently query // against network. if ([self.objects count] == 0) { query.cachepolicy = kpfcachepolicycachethennetwork; } [query orderbyascending:@"name"]; homecoming query; }

cellforrowatindexpath

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath object:(pfobject *)objects { static nsstring *simpletableidentifier = @"cell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:simpletableidentifier]; if (cell == nil) { cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:simpletableidentifier]; } //loading icons pffile *thumbnail = [objects objectforkey:self.imagekey]; pfimageview *thumbnailimageview = (pfimageview*)[cell viewwithtag:100]; thumbnailimageview.file = thumbnail; thumbnailimageview.image = [uiimage imagenamed:@"placeholder.jpg"]; [thumbnailimageview loadinbackground:^(uiimage *image, nserror *error) { if (!error) { } }]; //cell cell.textlabel.text = [objects objectforkey:self.textkey]; homecoming cell; }

thanks in advance :)

there no harm in loading images after short delay. standard procedure , followed many world class apps (ever seek scrolling in facebook or twitter app). work around quite messy in logical , programmatic terms.

ios objective-c uitableview uiimageview parse.com

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -