Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Request - Update View after location has been retrieved #6

Open
hyarlagadda opened this issue Dec 19, 2014 · 0 comments
Open

New Request - Update View after location has been retrieved #6

hyarlagadda opened this issue Dec 19, 2014 · 0 comments

Comments

@hyarlagadda
Copy link

I am trying to update the view as soon as the location has been retrieved. I added the below code in viewDidLoad method of my UIViewController.

[ [LocationShareModel sharedModel] addObserver:self forKeyPath:@"myLocationArray" options:NSKeyValueObservingOptionNew context:nil];

and added below code in my UIViewController for receiving the update.

-(void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {

if ( [keyPath isEqualToString:@"myLocationArray"] ) {
    NSLog(@"changedValues: %@", change);
    NSLog(@"Received value");
}

}

The observerValueForkeyPath is not being called.

Highly appreciate your help in this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant