ios - UI update in didEnterRegion? -
i'm making app features use of geofencing using cllocationmanager. i've implemented these 2 methods , both getting called appropriately:
- (void)locationmanager:(cllocationmanager *)manager didenterregion:(clregion *)region { [self updateui]; // update ui } - (void)locationmanager:(cllocationmanager *)manager didexitregion:(clregion *)region { [self updateui]; // update ui } i'm doing set of ui updates in method called updateui so:
- (void)updateui { // update labels, constraints, alphas , similar } updateui called within didenterregion , didexitregion, raises few questions:
- how work when app in background?
- should detect if app open or in background, ui update in viewwillappear instead?
- if updating ui bad thing in these didenterregion , didexitregion, consequences of doing it?
thanks!
erik
if app not in foreground when notification arrived, won't foregrounded. there little point doing interface @ point, because, in effect, there no interface. process notification in way - i.e. note down happened - , stop. job @ point out of there fast possible , let app go sleep. next time app comes front (becomes active), you'll notification of that, , now can make interface match data.
Comments
Post a Comment