tag:blogger.com,1999:blog-6621561.post3179535549058582553..comments2023-11-03T05:56:36.182-07:00Comments on ConceptDev (Craig Dunn's blog): MonoTouch sans Interface BuilderCraig Dunnhttp://www.blogger.com/profile/09377896535933926653noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6621561.post-88150510490394605452010-02-03T02:00:56.074-08:002010-02-03T02:00:56.074-08:00Steve,
As you've stated, the most 'basic...Steve, <br /><br />As you've stated, the most 'basic' way to build a form is just to use a UIView as a Canvas and start dragging controls on -- but then you do have a lot of formatting to make it "look nice" (adhering to the UI guidelines). So unless you've got a really complex/specific/non-standard layout in mind, the UITableView is a nice alternative.<br /><br />See Apple's doco on <a href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html" rel="nofollow">Table View Cells</a> (specifically, scroll down to the The Technique for Static Row Content section). That's one way to lay-out a form, and you'll see it a LOT in the built-in applications: the Contacts form is a good example. You don't have to draw all the cells in IB either, you can create them in code.<br /><br />Before you go down that route I would strongly recommend you also give <a href="http://github.com/migueldeicaza/MonoTouch.Dialog" rel="nofollow">Miguel's Dialog project</a> (<a href="http://tirania.org/tmp/a.png" rel="nofollow">example</a>) a try for a very neat, MonoTouch/C# specific way to construct forms (and inputs). I'm not sure how 'style-able/customizable' the cells are in Miguel's solution (apologies Miguel - I haven't played with it enough yet!) but it would definitely simplify the creation of the majority of forms.<br /><br />Finally - I'll just throw this in - you've mentioned a 'search form', so is there any reason why you can't express it with a single Search Bar? iPhone users are most used to seeing search in that format (from Maps and Mail to the core OS Search feature). I realise you might have 'advanced options' or something in mind -- but simplicity is the key to successful iPhone UIs so it's worth considering.Craig Dunnhttps://www.blogger.com/profile/09377896535933926653noreply@blogger.comtag:blogger.com,1999:blog-6621561.post-51231180297124820662010-02-03T01:38:09.957-08:002010-02-03T01:38:09.957-08:00Craig -
Thanks for posting these excellent exampl...Craig -<br /><br />Thanks for posting these excellent examples, it's really helping me get started with MonoTouch.<br /><br />I've added a ViewController class file and I want to create a search form on it. I can add controls on it such as a UILabel, but I want to format the layout. What's the best way of doing this with the UIKit? Should I use UITableView with UITableViewCells to hold each row of the form?<br /><br />cheers,<br />SteveUnknownhttps://www.blogger.com/profile/14269132110040459173noreply@blogger.comtag:blogger.com,1999:blog-6621561.post-5563694235338055442009-11-02T14:16:58.211-08:002009-11-02T14:16:58.211-08:00Mike, I'm not sure UITabBar has a grey version...Mike, I'm not sure UITabBar has a grey version -- I've only ever seen it in black.<br /><br />You got me curious; a quick google turned up these links... the first one might help you make a grey TabBar, the other two are just for fun<br /><br /><a href="http://stackoverflow.com/questions/675433/custom-colors-in-uitabbar" rel="nofollow">Custom colors in UITabBar</a><br /><br /><a href="http://silentmac.com/?p=386" rel="nofollow">UITabBar with a Custom Background</a><br /><br /><a href="http://stackoverflow.com/questions/1355480/preventing-a-uitabbar-from-applying-a-gradient-to-its-icon-images/1356560#1356560" rel="nofollow">Preventing a UITabBar from applying a gradient to its icon images</a>Craig Dunnhttps://www.blogger.com/profile/09377896535933926653noreply@blogger.comtag:blogger.com,1999:blog-6621561.post-77524300194488082162009-11-02T11:23:28.974-08:002009-11-02T11:23:28.974-08:00Craig, I see that I need to set controller.Navigat...Craig, I see that I need to set controller.NavigationBar.BarStyle to UIBarStyle.Default to make the nav bar gray, but what do I have to set so the UITabBar itself is the default gray?Mikehttps://www.blogger.com/profile/00745314077430333377noreply@blogger.comtag:blogger.com,1999:blog-6621561.post-47950101515698525762009-10-18T08:14:00.699-07:002009-10-18T08:14:00.699-07:00Hello Craig,
A few days ago I posted a Rosetta st...Hello Craig,<br /><br />A few days ago I posted a Rosetta stone document that can be used to translate Objective-C expressions into their equivalent C# ones:<br /><br />http://tirania.org/tmp/rosetta.htmlmdihttps://www.blogger.com/profile/11428205606558379989noreply@blogger.com