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 6210769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:13:07+00:00 2026-05-24T06:13:07+00:00

Ok, I know I must be doing something wrong, but darned if I can

  • 0

Ok, I know I must be doing something wrong, but darned if I can figure it out,

Basically I am trying to get the VisibleMapRect in the regionDidChangeAnimated call, but it appears as though this call is being fired before the value is actually being set, because the mapView.visibleMapRect value is NULL the first time it is called.

Attepting to do a comparison between mapView.visibleMapRect to nil, is invalid operand to binary expression (MKMapRect to void*)

NSLog(@"VISIBLE MAP RECT %d",mapView.visibleMapRect);  

Shows 0 every time.

NSLog(@"Visible Map Rect %@",mapview.visibleMapRect)

show (null) every time.

So what do I do? How the heck to I test around this case? Comparing to nil isn’t acceptable. I know there must be a way to handle this, but I am flumoxed at the moment.

  • 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-24T06:13:09+00:00Added an answer on May 24, 2026 at 6:13 am

    The visibleMapRect property is of type MKMapRect which is a struct so %d and %@ won’t work on the struct.

    You need to either log the individual fields within the MKMapRect or use the MapKit function MKStringFromMapRect:

    NSLog(@"Visible Map Rect %@",MKStringFromMapRect(mapView.visibleMapRect));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I know I'm doing something wrong - but can't figure out a better
I know i'm doing something very wrong here, but I'll be frank here my
I know I must be missing something, but in a while statement how does
I know websphere does it, so there must be something that lets apache figure
I've read several docs and I don't get it: I know I'm doing something
I know this isn't strictly a programming question but y'all must have experienced this.
So I know that unit testing is a must. I get the idea that
I think there must be something subtle going on here that I don't know
How do I lock compiled Java classes to prevent decompilation? I know this must
Do you know what basic information MUST include a paragraph ( <w:p/> ) in

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.