How to turn off the function of the multidisplay?

TomomiseTomomise JPMember ✭✭

In the application, we use the function of multi display.
However, it is not always used during application startup, and only for specific screens, dedicated display is performed.

"UIWindow.Screen = null" is executed when the specific display is completed, and it is displayed in iOS normal display.
However, when it is currently executed, an exception is generated.

 The following is an exception:
  System.ArgumentNullException :
  Value cannot be null.
  Parameter name: value

Considering the iOS sample program and the things that have been working so far,
it seems that there have been some changes in iOS 12,
but would someone tell me the information?

Tagged:

Best Answer

  • TomomiseTomomise JP ✭✭
    Accepted Answer

    Sorry for writing ambiguous codes.
    The actual code is described below.

        UIWindow SecondWindow{set;get;}
    
        ......
    
        public void RemoveSecondScreenViewController ()
        {
            if (this.SecondWindow != null) {
                this.SecondWindow.Hidden = true;
                this.SecondWindow.Screen = null;
            }
        }
    

    `

    Today, because the notification came,,
    so after checking the behavior, no problem occurred after checking the operation.

    Update contents.

    • Mono 5.12.0.309
    • Visual Studio for Mac 7.6.8
    • Xamarin.Mac 10.13.6

    Previously, since "Xcode 10 Preview" was installed and then switched to a stable version,
    it may have caused any problems ...
    Sorry, I have not checked the past versions.

    Now that the problem no longer occurs, let me solve it.
    Thank you.

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    I'm confused about the multi display and UIWindow.Screen = null, is it an iOS app?
    Could you please share some code?

  • TomomiseTomomise JPMember ✭✭
    Accepted Answer

    Sorry for writing ambiguous codes.
    The actual code is described below.

        UIWindow SecondWindow{set;get;}
    
        ......
    
        public void RemoveSecondScreenViewController ()
        {
            if (this.SecondWindow != null) {
                this.SecondWindow.Hidden = true;
                this.SecondWindow.Screen = null;
            }
        }
    

    `

    Today, because the notification came,,
    so after checking the behavior, no problem occurred after checking the operation.

    Update contents.

    • Mono 5.12.0.309
    • Visual Studio for Mac 7.6.8
    • Xamarin.Mac 10.13.6

    Previously, since "Xcode 10 Preview" was installed and then switched to a stable version,
    it may have caused any problems ...
    Sorry, I have not checked the past versions.

    Now that the problem no longer occurs, let me solve it.
    Thank you.

  • LandLuLandLu Member, Xamarin Team Xamurai

    Glad you solved it.

Sign In or Register to comment.