Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

How to access iOS view controller in the latest xamarin forms version?

$
0
0

Hi all, yesterday I updated my xamarin forms pcl solution (iOS, android and win phone sub projects) to the latest stable xamarin forms which I believe is 1.3. I have noticed that in the iOS project, there is no longer a need to create a window object and then a view controller object to launch the application. There is a new method which we are meant to call to launch the app called "load page" (sorry couldn't validate the precise method name at this time of writing because I'm not at home to check my code). I suspect all these window and view controller objects are still created behind the scenes by this new load page method which hides all this complexity from us but now I have a minor problem - how to access the currently visible and active view controller once this load page creates it? I need this so I can feed it to the platform specific azure mobile services Loginasync method which takes the view controller as it's first parameter. I managed to call a method from the app class which returns the main page and then call create view controller on that same page but I believe that the reason this gets my loginasync stuck(appears to never return once called- doesn't even show the google login page and doesn't throw an exception) is because I'm passing it a new instance of the view controller, not the correct active and visible one which was created when load page was called at the very beginning...
What might be happening is that the invisible view controller is being redirected to the google login page while the active one waits forever for a response that never arrives...
Any thoughts?


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>