Problem with new window title and settings in Xamain.Mac

rrradorrrado Member ✭✭

I've created new window controller in storyboard, set class names for windows controller and it's view controller and made modal segue from main menu item to new window. The VS created the classes. When I click the menu item, my window is opened, but settings are ignored - it means title is just "untitled" and my window appearance changes like "Close", "Minimize", "Restore", "Transparent Title bar" etc. are ignored.
I've placed breakpoints to view controller's override void ViewDidAppear() and window controller's constructor - both are called.
I've tried to create new windows in storyboard again in various ways, but nothing worked. I have other modal window in my project I've added some time ago and that one works.
I'm not sure if this is related problem, but I've noticed that when I call PerformSegue("segueName") to open problematic modal window, it does nothing. When I replace segueName to name of segue of working window, it opens. There is no exception and nothing in debugger's application output window.
Any ideas what could be wrong? Thank you.

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    edited November 2018

    Are you developing Xamarin.iOS or Xamarin.Mac?

  • JohnHairJohnHair GBMember ✭✭✭✭✭

    @ColeX said:
    Are you developing Xamarin.iOS or Xamarin.Mac?

    PMFJI,
    If Xamarin hadn't merged Xamarin.Mac into Xamarin.iOS, that would be obvious. Can you poke someone higher up to get this mess sorted out? Otherwise I doubt some contributors will come here anymore...

  • rrradorrrado Member ✭✭

    I'm developing Xamain.Mac but unfortunately it seems forums were merged

  • MichaelBothMichaelBoth AUMember ✭✭✭

    Are you possibly running into this issue?
    https://github.com/xamarin/xamarin-macios/issues/4848#issuecomment-427405971

    If so, it's resolvable using the package Chris made available. If you get stuck, let me know, and I'll check explicitly what version of Xamarin / Mono / VS I'm using for a working solution for our product and can post back here.

  • rrradorrrado Member ✭✭

    @MichaelBoth said:
    Are you possibly running into this issue?
    https://github.com/xamarin/xamarin-macios/issues/4848#issuecomment-427405971

    If so, it's resolvable using the package Chris made available. If you get stuck, let me know, and I'll check explicitly what version of Xamarin / Mono / VS I'm using for a working solution for our product and can post back here.

    Thank you for tip, but it is not this issue. I'm on older OS (High Sierra) and I had this issue also with older XCode. But I've still tried to install Mono from link you've provided but it didn't make a difference.

  • MichaelBothMichaelBoth AUMember ✭✭✭

    Sorry to hear that didn't help, it sounds similar to the issue I referenced. Hopefully @ChrisHamons or one of the other Xamarin devs can pop along and make a suggestion.

  • rrradorrrado Member ✭✭

    I've realized that when I change segue type from modal to modeless (show) it works. Also when I change segue type from show to modal in original Xamarin sample application "MacWindows" it stops working like in my project.
    I'm not sure if it is expected behavior implied maybe from cocoa (I'm new to cocoa so I don't know) or bug. In the Xamarin "Dialogs" tutorial they create modal dialog without window in storyboard (they create only the view) so they set the title programatically. I didn't find mention if this is the only correct way to show modal dialog or if there is option to design the window in storyboard as well.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    At face value that sounds like a Cocoa behavior and not a Xamarin.Mac bug. Sometimes it is difficult to tell with AppKit.

    It may be helpful to post a small sample project showing the behavior you are seeing, most people here are unlikely to spent the time attempting to reproduce your exact setup before looking at your specific issue.

  • rrradorrrado Member ✭✭

    I've just tried to create new swift project in xcode (luckily this is possible to do without single line of code :smile: ) and it works the same way so it is definitely cocoa behavior. Thank you guys

Sign In or Register to comment.