ios - Refresh split view -


i have universal application list of items (loaded backend) , item details (loaded backend well). each view controller listens uiapplicationdidbecomeactivenotification, view refreshed when user (re-)opens app. works far.

now problem. on ipad, have split view. so, when user (re-)opens app in landscape, both views reloaded. if there no connection backend, user gets 2 alerts retry/cancel options, 1 above other. not want... have 1 default item not require connection backend , want set selected , display details in detail view. when selected item missing in master view.

what have done far... in master view controller, check whether selected item available after refresh , if not, update selection , detail view. should solve problem when requests left , right pane processed in correct order. however, both view controllers uiapplicationdidbecomeactivenotification , make asynchronous requests backend.

has experience in refreshing split views? right way solve problem? don't want introduce additional notifications/complexity. hope, there standard way reload data.

well, found solution.

i create each view controller property alertview , store there alert view displayed. in viewwilldisappear, dismiss alert view. so, when details default item displayed right, alert view of "old" controller dismissed , have 1 alert view.

it sure not perfect solution , happy if can give me better one. now, works fine.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -