Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 550579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:18:11+00:00 2026-05-13T11:18:11+00:00

For an app I’m building, I have a custom old map effect PNG that

  • 0

For an app I’m building, I have a custom “old map” effect PNG that I’d like to overlay on the MKMapView view. Unfortunately, neither way I’ve tried to do this is exactly right:

  1. Add a subview to the MKMapView (issue: the UIImageView for the PNG gets placed above the Annotation pins, which looks weird
  2. Make the image an annotation view itself and place it below the other ones (issue: on scroll, I have to move the annotation view image, and for a while there’s just the regular map instead of the old-timey-effect).

What I basically want to accomplish is having a subview that is layered above the maptiles but below the annotation views, and that will hold steady while the user scrolls around—any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:18:12+00:00Added an answer on May 13, 2026 at 11:18 am

    Note that all MKMapView subviews hierarchy, annotations, behaviour etc proceeds in internal private MKMapViewInternal class so changing anything (in a way I suggest or another) in this structure may cause your application to be rejected from Appstore.

    I do not have a full solution, just an idea. My idea is to make an overlay view have the same superview as annotation views and ensure that annotations will be placed over our overlay. In MKMapViewDelegate we implement:

    - (void)mapView:(MKMapView *)aMapView didAddAnnotationViews:(NSArray *)views{
        if (views.count > 0){
            UIView* tView = [views objectAtIndex:0];
    
            UIView* parView = [tView superview];
            UIView* overlay = [tView viewWithTag:2000];
            if (overlay == nil){
                overlay = [[UIImageView alloc] initWithImage:[UIImage imageNamed:MY_IMAGE_NAME]];
                overlay.frame = parView.frame; //frame equals to (0,0,16384,16384)
                overlay.tag = 2000;
                overlay.alpha = 0.7;
                [parView addSubview:overlay];
                [overlay release];
            }
    
            for (UIView* view in views)
                [parView bringSubviewToFront:view];
        }
    }
    

    This code does a half of what you want – you get a view placed between map tiles and annotations. The remaining task is to change custom overlay view frame according to map scrolling/zooming (I’ll post if I find the way).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

App has 4 view controllers; Menu, A, B and C, and a singleton class
App Engine Datastore cannot be queried for an aggregate result. Example: I have an
My app allows user to reorder rows in a table view, but I want
Cocoa app, SnowLeopard I have a WebView in to which I'm loading HTML (essentially
App.config: <?xml version=1.0 encoding=utf-8 ?> <configuration> <appSettings> <add key=1 value=An error occured.\r\nPlease try again
App will run on Heroku Dependencies include paperclip haml compass devise aws-s3 Reasons for
App: C#, .NET4, Windows 7 When an app starts up, it gets a copy
My app streams content (fixed sized files, hence quotation marks) from an HTTP server
My app is using a tab bar controller with two tab bar items: Each
My app seems to crash sometimes when I rotate the phone. ViewControllerA has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.