3 ms·
I made a fake account to ask this question b/c I'm too ashamed not to know this: Is there an equivalent Visual Basic-style editor for making iOS apps? You just
by duffman 14y ago
I made a fake account to ask this question b/c I'm too ashamed not to know this:
Is there an equivalent Visual Basic-style editor for making iOS apps? You just place the button, double click on it, add functionality, drop in elements and you're off the races?
Just looking at this tutorial, it is astonishing how much knowledge you need to have to get up & running and create something so simple like a HelloWorld example (I've heard it is a herculean effort to do something really exotic like make text both bold and underlined in label on say a title screen)
Can somebody who knows their stuff please disabuse me of my ignorance/foolishness?
- raingrove 14y agoYes, there is Interface Builder in Xcode.
- danilocampos 14y agoI never actually used VB so maybe I'm talking out of my ass but... Storyboards sound like an attempt to do what you're describing. You can throw together a bunch of views without writing any code at all, then string them together so that a tap on a given button or cell pushes one view to the next. This is also pretty useful for prototyping.
- chairmankaga 14y agohttp://en.wikipedia.org/wiki/Xcode http://en.wikipedia.org/wiki/Xcode XCode has a drag and drop interface builder built in for iOS.
- CodeCube 14y agoThat's interface builder ... It's not quite as "RAD" as VB was because you have to wire up all the data sources for things like tables manually, and rather than double clicking to add a click event, you have to this whole weird outlet/action thing. But, generally speaking, same concept :P edit: I meant "weird" as in, weird to someone coming from VB-land. Once you're used to it there's nothing wrong or inherently bad with it
- k-mcgrady 14y ago>> "Is there an equivalent Visual Basic-style editor for making iOS apps? You just place the button, double click on it, add functionality, drop in elements and you're off the races?" That's pretty much how it works on iOS with Interface Builder (for laying out UI's) and Xcode. It's only slightly more complicated. Instead of double clicking the button and having the method auto-created for you, you create the method yourself and then in Interface Builder you link your button to the method (Ctrl click and drag from the button to your First Responder/Class object). Edit: VB is slightly easier to create a click method from an object but having used it to develop a Windows 8 style app I feel like Interface Builder is simpler overall. VB required me to write a LOT of XAML even when I was dragging objects on to the UI and double clicking. With Interface Builder all standard UI layout can be done without writing any code.
- potatolicious 14y agoWhy the shame? It's not as if iOS development is taught in grade school ;) Anyways, yes, in fact the linked tutorial is a version of Hello World without using Apple's own VB-like visual tools and doing everything in code. It's valuable to understand what's actually going on under the hood when you touch things in Interface Builder (the visual tool used to build UIs). Keep in mind Interface Builder is not as simple as VB, but it's a reasonable place to start if that's your background. > "(I've heard it is a herculean effort to do something really exotic like make text both bold and underlined in label on say a title screen)" It can be, yes. Keep in mind that iOS specifically lacks API available to regular old MacOS largely due to performance concerns. It is at the end of the day a phone. NSAttributedStrings is what you're looking for in this instance, and constructing them can still be a pain.
- MaxGabriel 14y agoThe tutorial here is foregoing the Xcode templates that start you off with a view controller, which adds alot of complexity. Personally I prefer Paul Hegerty's approach, where using the basic Xcode template+Storyboards means you don't have to deal with app delegate/window stuff until you need or want to. Previously underlining text was quite difficult, and required using CoreText (C framework) or an open-source wrapper around it, like TTTAttributedLabel. In iOS 6, support for attributed strings was introduced which makes it much easier.
- M4v3R 14y agoWhile learning how to do this stuff in code is a good exercise, it's much better to do these things in IB when possible. Here's the same app done in IB: http://dl.dropbox.com/u/1127246/Screenshots/op4t.png http://dl.dropbox.com/u/1127246/Screenshots/op4t.png This is it, that's the whole app (there is also an AppDelegate which I didn't even open and contains virtually no code). There are literally 3 lines of code written by me here (compared by 40-50 lines in the article). Everything else is generated/hooked up in the NIB by Interface Builder. This was done in about 2-3 minutes. In fact, this code performs better than the one from the article, because it uses Auto Layout. So when you rotate the device, you get a desired outcome: http://dl.dropbox.com/u/1127246/Screenshots/rulo.png http://dl.dropbox.com/u/1127246/Screenshots/rulo.png If you do the same with the app from the article, you'll see this: http://dl.dropbox.com/u/1127246/Screenshots/sncv.png http://dl.dropbox.com/u/1127246/Screenshots/sncv.png And then you'll have to write another bunch of code in layoutSubviews method, or manually create struts and strings or constraints.
- evo_9 14y agoHaving used both, the answer is actually no. People will say that Interface Builder is the equivalent and to some degree that's true - you use both to drag/drop UI elements on the page. However, the main feature I think you are looking for from VB (and any Visual Studio language for that matter) is the ability to double-click on a something like a Button control and have it create a new click event all wired up ready to go for you to add your code (or take you to an existing click-event if you've already done this). So Visual Studio adds the delegates/wiring necessary for the control to fire properly when clicked on. Unfortunately this is where Interface Builder gets crazy and confusing. Double-clicking a Button control in Interface Builder does not do this for you; Instead you have to use Actions for something like a click event and Outlets if you wanted to wire up a Label and then be able to programmatically change it from code-behind. You'll actually need to drag a special Outlet or Action connector in Interface Builder to make that crucial relation between Interface Builder and Xcode. So while Interface Builder serves a very similar purpose to Visual Studios UI builder there is a pretty significant disconnect between it and the code-behind that makes it much less intuitive to use.
- bennyg 14y agoThis is still fairly trivial stuff, and I like the IDE a ton better in Xcode than Visual Studio (seriously, I shouldn't have to stop my current build just to add lines in VS - that's lame). Just open up your dual screen editor, put the xib on the left or right, then your header on the other side. Right-click down on an element (hold it!) then drag over to the header. It'll set everything up you need to add your event actions in the header and implementation files, as well as the getter/setter methods.
- matwood 14y agoWay back in the day I started my software career in VB5. Helloworld in iOS isn't quite that simple, but pretty close if you follow a quick tutorial that explains what's happening. The most confusing part for newcomers to iOS is the connections between IB and code. Starting in iOS is just like starting in anything else for the first time, it is all new so very little makes sense. As far as your example, the problem with the label pre-ios 6 was that it wasn't easily styleable beyond simple styles. For anything complicated it was generally easier to put the text in a web view and present it that way. With iOS6 Apple finally added an attributed text field with a lot more style options. I have written native apps in both Android and iOS and each have their strengths and weaknesses.