yes. init is the constructor. Obj-C's pattern is:

mything = [[UIThing alloc] init];

which is the same as

mything = new UIThing();

the rest is just the verbose way of specifying the first param.

So initWithNibName (which takes 2 params) is just

public UIThing(string nibname, string bundle)

:)

N

On Sat, Jul 14, 2012 at 10:22 PM, Phil Cockfield <[email protected]> wrote:

> I'm working through some Obj-C examples, and translating them into
> MonoTouch.  I'm looking at code which is within an  *initWithNibName *method
> within a *UIViewController*
>
> Looking at Miguel's Rosetta Stone 
> <http://tirania.org/tmp/rosetta.html>mapping index of Obj-C selectors to 
> methods, I'm finding this:
>
> Class UIViewController
> Selector: *initWithNibName:bundle:*
> Method: *IntPtr Constructor ([NullAllowed] string nibName, [NullAllowed]
> NSBundle bundle);*
>
>
>
> Is it fair to say that is simply the C# constructor of my derived class?
>  Or is that pointing at something else?
>
> --
> *Phil *Cockfield
>
>
>
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>


-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
Earnest: Self-employed? Track your business expenses and income.
http://earnestapp.com
Nearest Bus: find when the next bus is coming to your stop.
http://goo.gl/Vcz1p
London Bike App: Find the nearest Boris Bike, and get riding!
http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to