iOS 13.2.3 pdfViewGestureRecognize and PDFkit

Here is my Code it work perfectly in iOS 12 but for iOS 13 code can’t give exactly values

 

 

 

 

    let pdfViewGestureRecognizer = PDFViewGestureRecognizer()

 

 

     pdfView.autoScales = true

            pdfView.displayMode = .singlePage

            pdfView.displayDirection = .horizontal

            pdfView.usePageViewController(true, withViewOptions: [UIPageViewControllerOptionInterPageSpacingKey: 20])

          

            pdfView.addGestureRecognizer(pdfViewGestureRecognizer)

          

            pdfView.document = pdfDocument

 

 

 

 

 

 

here is first problem is not go here I adding great delegate for Gesture and other details find here but isn’t work too !!

 

 

 

 

class PDFViewGestureRecognizer: UIGestureRecognizer {

    var isTracking = false

 

 

    override func touchesBegan(_ touches: Set, with event: UIEvent) {

        isTracking = true

        print (“but not iOS 13.2.3”)

      

      

    }

    override func touchesEnded(_ touches: Set, with event: UIEvent) {

        isTracking = false

      

      

    }

 

 

    override func touchesCancelled(_ touches: Set, with event: UIEvent) {

        isTracking = false

    }

}

 

 

here is second part

 

 

 

 

            let pdfSubVws = pdfView.subviews

            print(“subVws  “,pdfSubVws)

          

            for subVws in pdfSubVws

            {

                if (String(describing: subVws).range(of:”UIPageViewControllerContentView”) != nil)

                {

                    let pageVc = subVws.subviews

                  

                    for subVws in pageVc

                    {

                        if (String(describing: subVws).range(of:”UIQueuingScrollView”) != nil)

                        {

                            let QueueVc = subVws.subviews

    //                        print(“QueueVcQueueVc  “, QueueVc)

                            for subVws in QueueVc

                            {

                                if (String(describing: subVws).range(of:”UIView”) != nil)

                                {

                                    let viewVc = subVws.subviews

    //                                print(“nnviewVcVcQueueVc  “, viewVc)

                                  

                                    for subVws in viewVc

                                    {

                                        if (String(describing: subVws).range(of:”UIView”) != nil)

                                        {

                                          

                                            let SubviewVc = subVws.subviews

    //                                        print(“nnSubviewVcSubviewVc  “, SubviewVc)

                                          

                                            for subVws in SubviewVc

                                            {

                                                if (String(describing: subVws).range(of:”UIScrollView”) != nil)

                                                {

                                                    let finalVw = subVws.subviews

    //                                                print(“nnfinalVw  “, finalVw)

    //

                                                    for subVws in finalVw

                                                    {

                                                        if (String(describing: subVws).range(of:”UIView”) != nil)   //here is  ok iOS 12 It’s ok  but not iOS 13.2.3

                                                        {

Powered by WPeMatico

You may also like...

Comments are closed.