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

  • Home
  • SEARCH
  • 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 9248295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:54:50+00:00 2026-06-18T09:54:50+00:00

I implemented a small mapView (65×65) in a scrollView in a viewController. If i

  • 0

I implemented a small mapView (65×65) in a scrollView in a viewController. If i set the Position of the mapView per XIB and run it on the Simulator or iOS Devices it is not sitting on the right Position:

  • XIB right position
  • iPhone 5 to high
  • iPhone 4 (or Simulator) much to high

I can correct the position for each situation with these codes, but this cant be the solution:

Code for the same Position in the XIP:

CGRect newFrameMapView = CGRectMake(10,171,65,65);
mapView.frame = newFrameMapView;

Code to correct it for the output on iPhone 5:

CGRect newFrameMapView = CGRectMake(10,215,65,65);
mapView.frame = newFrameMapView;

Code to correct it for the output on iPhone 4:

CGRect newFrameMapView = CGRectMake(10,302,65,65);
mapView.frame = newFrameMapView;

Notes:

  • I have got a navigationController on the top.
  • Nothing changes if i put the mapView out of the scrollView.
  • I dont use Autolayout

— Edit — 23.01.2013 ———————————–

I ‘ve renamed the “mapView” into “mapView2” to make sure not to change the position on other parts of my code.

Here are the important code fragments of the .h

#import <MapKit/MapKit.h>

@interface ViewControllerDetail : UIViewController <MKMapViewDelegate> {

    IBOutlet MKMapView *mapView2;

}

@property(nonatomic, retain) IBOutlet MKMapView *mapView2;

@end

and the .m

@implementation ViewControllerDetail

@synthesize mapView2;

[…]

// Basic Settings Map

[mapView2 setMapType:MKMapTypeStandard];
[mapView2 setZoomEnabled:NO];
[mapView2 setScrollEnabled:NO];
[mapView2 setDelegate:self];

// Map Start

MKCoordinateRegion myStartRegion = { {0.0, 0.0}, {0.0, 0.0} };
myStartRegion.center.latitude = 44.087439;
myStartRegion.center.longitude = 2.139614;
myStartRegion.span.latitudeDelta = 0.003;
myStartRegion.span.longitudeDelta = 0.003;
[mapView2 setRegion:myStartRegion animated:NO];


// Map Point

MKCoordinateRegion myBeispielRegion = { {0.0, 0.0}, {0.0, 0.0} };
myRegion1.center.latitude = 44.087439;
myRegion1.center.longitude = 2.139614;
classAnnotation *annotationRegion1 = [[classAnnotation alloc] init];
annotationRegion1.coordinate = myRegion1.center;
[mapView2 addAnnotation:annotationRegion1];
  • 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-06-18T09:54:51+00:00Added an answer on June 18, 2026 at 9:54 am

    I found the mistake:

    (Dunno if this is normal, i use Xcode Version 4.5)

    If i insert an MapView in the Xib it is automatically set on Autosizing left/bottom. I didn’t noticed that, i thought the standard autosizing is left/top.

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

Sidebar

Related Questions

I have implemented a small Windows Service which runs every 9 minutes and writes
I have a small dynamic site implemented in mod_python . I inherited this, and
I have a small application in C#, and so far I have implemented it
I have to implement an application in which I have set small edittext for
i implemented a small web application to create Rss feeds in java(spring mvc) i
I've implemented a small test which uses celery for message queueing and I just
I have implemented a small command line interface using JewelCLI and it creates an
I am maintaining a small application that has some plugin-like functionality, which is implemented
I implemented a small Facebook app via its SDK. I was testing posting message
I have implemented a small scene graph to be rendered by OpenGL, all the

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.