Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Conversation

@martijn00
Copy link
Contributor

@martijn00 martijn00 commented Nov 1, 2017

Description of Change

This changes the way the window is used in iOS in a backwards compatible way.

Bugs Fixed

It was not possible to swap out the current root for a native Xamarin ViewController, and then navigate back to a Forms one.

Also when changing the MainPage on a custom window it would crash because it would not implement PlatformRenderer. The new check prevents this.

API Changes

List all API changes here (or just put None), example:

Added:

  • Window { get; set; }

Behavioral Changes

This will not change any behaviour but just enable to work easier with Native views, especially in MvvmCross.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@dnfclas
Copy link

dnfclas commented Nov 1, 2017

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some issues with formatting other than that i don't see a problem

var platformRenderer = (PlatformRenderer)_window.RootViewController;

if (platformRenderer != null)
if(Window.RootViewController is PlatformRenderer platformRenderer)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is C#7, yeah? Love it, but we're stuck in VS2015 land for now. :(

Also, if you make other changes to the file, please also add a space between the if and parens. Not a big deal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm ok, i'll make some changes. There is nothing about this in the Wiki on how to contribute.

@martijn00
Copy link
Contributor Author

@samhouts Implemented requested changes.

Copy link
Contributor

@samhouts samhouts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@samhouts samhouts dismissed rmarinho’s stale review November 8, 2017 02:37

Formatting was fixed

@rmarinho rmarinho merged commit 0cece46 into xamarin:master Nov 8, 2017
@martijn00 martijn00 deleted the CustomWindow branch December 15, 2017 02:21
@samhouts samhouts added this to the 3.0.0 milestone May 5, 2018
@samhouts samhouts modified the milestones: 3.0.0, 2.5.0 Aug 23, 2019
@samhouts samhouts modified the milestones: 3.0.0, 2.5.0 Oct 29, 2019
mattleibow pushed a commit that referenced this pull request Jan 28, 2021
Fixes #1247 Must set SourceRect in iOS 13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants