iphone - Loading time storyboard controller is very long -


i have complicated uiviewcontroller in storyboard. uiviewcontroller have uitableview 2 scrollview in cells,two others uiview, 5 uiimageview , uilabels. first time when user see controller time ~5s, next times fast ~0.5s.

the lag between viewwillapper , viewdidapper in lifecycle controller.

how can optimise view uiviewcontroller?

ok found problem:

dthtmlattributedstringbuilder *stringbuilder = [[dthtmlattributedstringbuilder alloc] initwithhtml:data                                                                                            options:builderoptions                                                                                 documentattributes:nil];  nsattributedstring *attrstring = [stringbuilder generatedattributedstring]; 

generatedattributedstring generated lag. found problem time profiler ( fogmeister).

so remove problem generate fake content before initialize viewcontroller:

    nsstring *html = @"<html>fake content</html>"; nsdata *data = [html datausingencoding:nsutf8stringencoding]; nsdictionary *builderoptions = @{                                  dtdefaultfontfamily: @"helvetica",                                  dtdefaultfontsize: @14                                  }; dthtmlattributedstringbuilder *stringbuilder = [[dthtmlattributedstringbuilder alloc] initwithhtml:data                                                                                            options:builderoptions                                                                                 documentattributes:nil];    nsattributedstring *attrstring = [stringbuilder generatedattributedstring]; zlog(@"attrstring %@", attrstring); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -