codemill.vmfirstnav
codemill.vmfirstnav copied to clipboard
Can't get TopViewController in iOS native layter
Here is how we want to get the top view controller in Xamarin iOS native layer,
vc = UIApplication.SharedApplication.KeyWindow.RootViewController;
while (vc.PresentedViewController != null)
{
vc = vc.PresentedViewController;
}
if (vc is UINavigationController)
{
vc = ((UINavigationController)vc).TopViewController;
}
However, we can't get correct top view controller when we are navigating to a page but It works fine if the top page is a modal page.
by updating the xamarin and identity it works
Thanks @chrisgate - I'll go through in the next couple of days to get the NuGets all updated, so others don't run into the same issue as you. (Unless you want to put in the PR 😄)
i always want to do that for every resources i consumed but i really dont know how..........i learn to take advantage of github but i am yet to know how to PR.
How do i go about it.
thanks
Cool! I'd love to help!
I'm guessing you were already able to clone everything. That's good because you'll have to do it again 😄 But first...
- Install GitHub Desktop if you haven't already - this will make it easier overall
- In the upper right hand corner of this issue page - or the overall repository page - click on the Fork button. That will create a copy of this repository in your account.
- Clone that repository to your local disk (using GH-Desktop, the "forms-ad-b2c" name will be prefixed with your username, so that'll be yours to work with).
- Go through and make the changes that you need to make. (If you like, you could create a branch locally as well).
- All the while you're making the changes - click the "publish" / "sync" button - that will push your changes to your repo on GitHub. Making sure everything is backed-up, so to speak.
- Once you're finished with the changes - in GH-Desktop there will be a button that says "Update from codemillmatt/master" click that - that will merge any changes from this repo into yours (there won't be any 😄 ) but if there were, that would give you a chance to fix any conflicts.
- Then finally, hit the sync button again to push the final, merged, changes to your repo in GitHub.
- Go to the GitHub website, and you should see a button that says "create pull request" - click that, enter any comments - and then I'll get notified that there are changes waiting to be made.
- If everything looks good to me - I'll accept the changes into the repo - and then you'll be a contributor!!
(I wrote this all from memory - so hopefully it's all right now - but you can always google "github flow" and that'll turn up some results as well.)
Feel free to reach out at any time while you're doing this!
I will do this in morning.............thanks