objective c - Developing an app for ios i'm supposed to support fast or slow connection? -
strange question know. i'm developing app ios target being visitors of commercial centre. app provide internal updating system, using xml system, long list of reasons works differently in case of slow or fast response of net. difference stands in different type of malfunctioning of ui, , can choose have better performance in case user have slow connection or fast one, 2 solution (one problem on fast case, 1 slow case) issue have, involve 1 presence of malfunctioning in other case. in case, i'm supposed favor users belong fast or slow connection , why?
edit: i'll try explain problem. have view need updated via xml. when launch view, simple fact try access xml control if update needs done, takes time. added activity indicator, doesn't work fine for, net gets slower, seems take more time activity indicator show, result user have time think app frozen, try touch button has not touch (that not work , make him think app doesn't work) , on. used performselectorinbackground in order add activity indicator fast can , works fine in slow connection case. in fast connection case, activity appear fast appears if control if update must done, due speed of connection, takes near no time, causing show activity indicator picosecond, giving awful graphical effect avoided. avoid problem in fast case added
dispatch_after(dispatch_time(dispatch_time_now, 0.000001 * nsec_per_sec), dispatch_get_current_queue(), ^{ code add activity indicator; }); and, in way, not have graphical problem of fast case, in slow case execution of dispatch_after (i guess) slow down showing of activity indicator causing impression app freezed. hands tied , don't know it's prefer.
you can determine type of connection user has (edge/3g or wi-fi) , perform different methods each type of connection. sample code here. wi-fi faster , cheaper, can provide "fast code" it.
p.s. still not sure talking about. perfomance? difficult give proper advice without details, still:
1) can download needed stuff in background.
2) if it's menus images/videos/music - start downloading list titles, after download media files. (like android market on slow connections).
edit: first of all, don't mix views , network tasks. downloading should done outside of viewcontroller, in thread. can download new xml each n minutes (or use if-modified in request) , show next time user tries see view. how new xmls? it's important, maybe can avoid downloading @ same moment ui drawining. luck!
Comments
Post a Comment