Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I am getting an issue in assigning the MKMapView object to view,
- UIView *tempView = [[UIView alloc]initWithFrame:CGRectMake(1, 102, 318, 377)];
- [self.view addSubview:tempView];
- lMapViewTemp = [[MKMapView alloc]initWithFrame:CGRectMake(0, 0, 318, 377)];
- lMapViewTemp.delegate = self;
- Issue at this line:
- [tempView addSubview:lMapViewTemp]; EXC_BAD_ACCESS (Code=1,address=0xc)
- When i call the above structure once, Its working fine. And after,
- //calling for add contact
- - (IBAction)BnEditContact:(id)sender{
- UIButton *button = sender;
- buttonTag = (int)button.tag;
- if(!picker){
- picker=[[ABPeoplePickerNavigationController alloc] init];
- }
- picker.peoplePickerDelegate = self;
- [self presentViewController:picker animated:YES completion:nil];
- }
- -(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
- shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property
- identifier:(ABMultiValueIdentifier)identifier{
- [self dismissViewControllerAnimated:YES completion:nil];
- return NO;
- }
- - (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker
- {
- [self dismissViewControllerAnimated:YES completion:nil];
- }
- - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person {
- //calls displayPerson:(ABRecordRef)person to show contact's information in the app
- [self displayPerson:person];
- [self dismissViewControllerAnimated:NO completion:NULL];
- return NO;
- }
- I am receiving contacts from the above code. Now, If i again try to access the mapView. Its raising Issue.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement