2

I am very new to MvvmCross and Xamarin development. I am using MvvmCross 6.x

I followed the TipCalc tutorial and I was able to setup the core project, but, when I tried to setup the iOS project, I did not find any item to add View Controller with xib file in Visual Studio 2017 on Windows.

Only options I see is to add a view controller with story board, view controller class and uiview, but no item to add view controller with xib, under user interface.

I tried to add view with a storyboard and decorated the class with MvxFromStoryboard attribute, but the view does not show when I run the app.

What am I missing?

I am using Visual Studio 2017 on Windows. I cannot find the option to add a view controller with xib.

Only options I see is to add a view controller with story board, view controller class and uiview, but no item to add view controller with xib, under user interface.

Samuel Liew
  • 76,741
  • 107
  • 159
  • 260
WPF_DEV
  • 21
  • 3
  • Thanks for the response. I was able to get it working with storyboard. I started from zero again and decorated the class with [MvxFromStoryboard(StoryboardName = "TipView")] and set the Storyboard ID and Restoration ID to "TipView". Thanks. – WPF_DEV May 18 '18 at 14:54

2 Answers2

1

Visual Studio remove viewController with xib template since 15.7.

If you still want to add viewcontroller like before, here is a workaround.

1.Add View Controller With Storyboard first,and remove the .Storyboard file.

2.Add .xib file and name it as your view controller.

enter image description here

3.Remove the code which initial viewcontroller in Storyboard way.

enter image description here

4.Click .xib class(blank area) and Link it to your viewcontroller.

enter image description here

  1. Open .xib with XML(Text)Editor way and add this code snippet under placeholder in order to create connection to the view.

enter image description here

ColeX
  • 14,062
  • 5
  • 43
  • 240
0

Right click -> Add -> New File and select the iOS tab and then select View Controller

Create xib

FabriBertani
  • 1,606
  • 13
  • 24