Bug 608 - MapKit.MKMapView CalloutAccessoryControlTapped event not working on iPad simulator or devices...
Summary: MapKit.MKMapView CalloutAccessoryControlTapped event not working on iPad simu...
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 4.x
Hardware: PC Mac OS
: --- major
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-09-02 15:46 UTC by Dominique
Modified: 2011-10-03 08:20 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
MonoTouch.Dialogs based Test case for Callout failure (16.38 KB, application/zip)
2011-09-02 15:46 UTC, Dominique
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Dominique 2011-09-02 15:46:01 UTC
Created attachment 245 [details]
MonoTouch.Dialogs based Test case for Callout failure

I've noticed that the CalloutAccessoryControlTapped event never fires on iPad, but works fine on iPhone/iPod devices.

Attached is a TestCase highlighting the issue. In order for the testcase to work you will also need MonoTouch.Dialogs installed as well as the following pull request https://github.com/migueldeicaza/MonoTouch.Dialog/pull/53 where MapKitElement is defined.

When the test case runs, and you select to view the map, a single custom pin is displayed. Select the pin and a popup will appear with custom Right and Left CalloutAccessoryViews. Selecting the right accessory view will take you to a webpage. On iPhone/iPod devices/simulator, this works, while on iPad devices this does not work.

I hope this helps.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2011-10-03 05:32:16 UTC
I can reproduce it with your test case, looking at it now.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2011-10-03 08:20:24 UTC
You need to make your UIWindow the size of your screen, otherwise all clicks outside of the upper-left corner (imagine an iPhone sized rectangle at the upper-left corner) are dropped.

Quoting from Apple's documentation:

"Important: When creating your window in Interface Builder, it is recommended that you enable the Full Screen at Launch option in the attributes inspector. If this option is not enabled and your window is smaller than the screen of the target device, touch events will not be received by some of your views. This is because windows (like all views) do not receive touch events outside of their bounds rectangle. Because views are not clipped to the window’s bounds by default, the views still appear visible but events do not reach them. Enabling the Full Screen at Launch option ensures that the window is sized appropriately for the current screen."

from: http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/CreatingWindows/CreatingWindows.html#//apple_ref/doc/uid/TP40009503-CH4-SW1

If I enable the Full Screen at Launch option, clicks are received properly.