To do the refresh of the view do not call viewWillAppear
if the view is already displayed. What you want to do is the following:
When ConnectionDidFinishLoading
method is triggered post a notification
[[NSNotificationCenter defaultCenter] postNotificationName:@"refreshView" object:nil];
In your viewController
observe for this notification. You do it by adding this code to your init or viewDidLoad
method
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshView:) name:@"refreshView" object:nil];
Now implement -(void)refreshView:(NSNotification *) notification
method in your viewController
to manage your view to your liking.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…