Results 1 to 4 of 4

Thread: [iOS]SKCalloutView customising

  1. #1
    Etablierter skobbler
    Join Date
    07.03.2016
    Posts
    42

    [iOS]SKCalloutView customising

    Hi,

    would you please provide an example of how I can change buttons images and the background colour of standard SKCalloutView?

    KR,
    Milo
    Last edited by high5fly; 24.03.2016 at 11:24.

  2. #2
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    An example of using the SKCalloutView class you will find in our getting started guide in the "Configuring visual elements" chapter: http://developer.skobbler.com/gettin...android#sec007

  3. #3
    Etablierter skobbler
    Join Date
    07.03.2016
    Posts
    42
    Hi would you please provide it for iOS, and I am most interest of setting background colour for the whole callout view.

  4. #4
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    On iOS you have to override the calloutViewForAnnotation callback: http://developer.skobbler.com/docs/i...ForAnnotation:
    You'll find an example in the demo project (inside AnnotationsViewController.m) where you can create a user defined UIView and return that:

    Code:
    - (UIView*)mapView:(SKMapView *)mapView calloutViewForAnnotation:(SKAnnotation *)annotation
    {
        //Custom callouts.
        if (annotation.identifier == self.annotation1.identifier)
        {
            UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0.0f, 0.0f, 200.0f, 50.0f)];
            view.backgroundColor = [UIColor purpleColor];
            view.alpha = 0.5f;
            return view;
        }
    
        return nil;// Default callout view will be used.
    }

Posting Permissions

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