Sunday, 15 March 2015

ios - MonoTouch - Create UI Without Xib -



ios - MonoTouch - Create UI Without Xib -

i looked @ monotouch.dialog stuff , it's pretty awesome. however, has limitations. hoping able create app without having utilize xib files, i'm not sure how that. without monotouch dialog , xib files.... don't know other way.

could point in right direction?

i didn't know how longest time, it's simpler think! add together regular c# class (you don't need utilize of special templates), import monotouch.foundation , monotouch.uikit namespaces, , create new class subclass of uiviewcontroller.

it's simple! you'll want override usual methods viewdidload, should plenty started. far implementing ui without using .xib, create programatically, set frame, , add together view (and of course of study customize properties/methods , such)!

you set like:

// table setup var versestable = new uitableview () { frame = new rectanglef (0, 0, view.bounds.width, view.bounds.height - 93), backgroundcolor = uicolor.frompatternimage (images.backgroundtexture), }; view.addsubview (versestable);

the hardest part of doing getting frame , setup (imo).

there real-life code of not using .xibs , using monotouch.dialog @ github page tweetstation. https://github.com/migueldeicaza/tweetstation/blob/master/tweetstation/dialogs/settings.cs

in xamarin forums, there post detailing more examples of using purely c# code (no .xibs) helpful!

ios monotouch xamarin

No comments:

Post a Comment