Results 1 to 2 of 2

Thread: Annotations with custom image not being displayed

  1. #1
    Neuer skobbler
    Join Date
    06.07.2014
    Posts
    8

    Annotations with custom image not being displayed

    Hi,

    Custom images for annotations are not working on my side.

    This is the image I'm using: cl.ly/image/0l0T2n1B3O07

    purpleAlert.png

    (Photoshop generated, 64x64, 24-bit transparent PNG)

    Code (just like the demo project):

    SKAnnotation *annotation = [SKAnnotation annotation];
    // set unique ID
    // set location

    annotation.imagePath = [[NSBundle mainBundle] pathForResource:@"purpleAlert" ofType:@"png"];
    [self.mapView addAnnotation:annotation];

    No luck. Nothing is displayed.

    If I chose one of the default types, like:

    annotation.annotationType = SKAnnotationTypeStaticSpeedcam3D;

    It works fine.

    Thanks.

  2. #2
    Neuer skobbler
    Join Date
    06.07.2014
    Posts
    8
    Here is how I solved it:

    Outside Xcode, via Terminal:

    touch

    Back to Xcode project, clean (command + shift + K).

    Install. Enjoy a beer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •