Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

UIBarButton unrecognized selector sent #106

Closed
shmidt opened this issue Dec 3, 2012 · 3 comments
Closed

UIBarButton unrecognized selector sent #106

shmidt opened this issue Dec 3, 2012 · 3 comments
Labels
Milestone

Comments

@shmidt
Copy link

shmidt commented Dec 3, 2012

Installed lates version through CocoaPods,
and app started to crash when I use UIBarButtonItem block(with old version it was OK):

UIBarButtonItem *mapsButton = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"Map"]    style:UIBarButtonItemStyleBordered handler:^(id sender) {
    double latRoute = place.placemark.location.coordinate.latitude;
    double lonRoute = place.placemark.location.coordinate.longitude;

    MKPlacemark *myPlacemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(latRoute, lonRoute) addressDictionary:place.placemark.addressDictionary];
    MKMapItem *myPoint = [[MKMapItem alloc] initWithPlacemark:myPlacemark];
    myPoint.name = place.name;
    myPoint.url = [NSURL URLWithString:place.webURL];
    myPoint.phoneNumber = place.contactPhone;
    dispatch_async(dispatch_get_main_queue(), ^(void) {
        [myPoint openInMapsWithLaunchOptions:nil];
    });
}];
@shmidt
Copy link
Author

shmidt commented Dec 3, 2012

P.S. Issued solved by deleting other linker flags in project

@a2
Copy link
Collaborator

a2 commented Jun 30, 2013

@shmidt Is this still a problem?

@shmidt
Copy link
Author

shmidt commented Jul 1, 2013

@a2 No, it is not :)

@shmidt shmidt closed this as completed Jul 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants