Bug 6245 - Add iPhone View only creates a .XIB
Summary: Add iPhone View only creates a .XIB
Status: RESOLVED FEATURE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-07-23 20:38 UTC by Tom Opgenorth
Modified: 2013-01-09 11:19 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FEATURE

Description Tom Opgenorth 2012-07-23 20:38:10 UTC
When I go to File...New File and select iPhone View, all that I get is the .XIB file.  There are no partial C# classes for me to code with.  There is no .H file for XCode. If I open this file in XCode I cannot add any outlets or actions to it.  Is this by design?  If so, what is the intended scenario?

I would expect that by adding a new iPhone view the necessary files would be in place so that I can edit this file in XCode or use it as part of an existing controller.
Comment 1 Jeffrey Stedfast 2013-01-04 16:24:26 UTC
iPhone and iPad View templates are for xibs-only, they aren't supposed to generate any C# code.

The ViewController templates generate code, though.

I'm not sure what the reasoning behind this is.

Hutch?


BTW, most of these xib templates look to have been generated with Xcode3
Comment 2 Mikayla Hutchinson [MSFT] 2013-01-07 04:50:49 UTC
It it's exactly as described - it adds a new view, and nothing else. This is useful for example if you wanted a new view xib to use with an existing controller.

The one you probably want is "view with controller", which adds a view and a controller.
Comment 3 Tom Opgenorth 2013-01-07 13:23:25 UTC
But how can I use this .XIB file with an existing controller? IIt seems that there is no way I can do anything with this .XIB created by the template.
Comment 4 Mikayla Hutchinson [MSFT] 2013-01-09 11:19:58 UTC
The same way you use any other xib - pass it to the controller's base ctor, or use UIBundle to deserialize it.