NSDictionary *regionDict = (NSDictionary *) region;
NSNumber *lat = [regionDict objectForKey:@"lat"];
//[latitude addObject:lat];
NSNumber *lng = [regionDict objectForKey:@"lng"];
//[longitude addObject:lng];
NSLog(@"%@%@%@",lat,lng,titles);
if(lat == [NSNumber numberWithFloat:0.00] && lng == [NSNumber numberWithFloat:0.00])
{
NSLog(@"%@%@%@",lat,lng,titles);
}
else
{
CLLocationCoordinate2D coord;
coord.latitude =lat.doubleValue;
coord.longitude =lng.doubleValue;
MapViewAnnotation *annotation =[[MapViewAnnotation alloc]initWithTitle:titles AndCoordinate:coord];
[self.mapView addAnnotation:annotation];
}
if condition is not satisfied because of NSNumber not check with null value. what is the way i can check? Tell me possible ways.. for checking null.