Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2290
UILongPressGestureRecognizer and unified version of IG dll
posted

Hi,

I was using UILongPressGestureRecognizer to get a long tap from day view of the CalendarView while using classic version of IG.dll - all worked fine. AT some point I converted a project to unified version using IG.Unified.dll and only last week noticed that my working code to do with UILongPressGestureRecognizer does not call selector anymore.

I created 2 identical very simple project - classic and unified and the same - unified does not call the selector.

Is there something that is changed in a way it works.

I am attaching both versions - 

CalendarAppointmentsAsync_CS - working version non unified

App1 - exactly the same code but built as unified

To see the problem just tap for longer then 2 seconds on a day view.

CalendarAppointmentsAsync_CS.zip
  • 4940
    Verified Answer
    Offline posted

    Hi Mark,

    Adding your own gesture recognizer isn't necessary anymore. In your CalendarViewDelegate class, add the override for CalViewHourPressedForDate.

    public override void CalViewHourPressedForDate (IGCalendarView calView, nfloat hour, NSDate date)
    {
        Console.WriteLine("Long Tap!");
    }

  • 2290
    Offline posted

    Perfect!

    Thank You