Live data from Hacker News

Your First iOS App – 100% Programmatically

blog.austinlouden.com

11–20 of 111 posts

Re: Your First iOS App – 100% Programmatically

#11
post #4

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 exampl…

That'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

Re: Your First iOS App – 100% Programmatically

#12
post #4

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 exampl…

>> "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.

Re: Your First iOS App – 100% Programmatically

#13

So, a word of advice to new folks trying out iOS land: Interface Builder is most emphatically your friend. The compile/debug cycle in iOS is sufficiently lengthy that laying out views programmatically gets very tedious very fast. Besides realtime previewing of exactly how your view is going to look , IB also helps you understand how your layout is affected by rotations to landscape and differences in view height betw…

"There's enough tedious code to wrangle in iOS as it is – don't create more for yourself by rejecting a mature, useful tool."

That's probably true. But some of us learn better by doing the tedious bits (basically less magic) to see how everything works together, and then look for the path to remove the tedious bits (which would lead to using IB) once we have a better grasp of things.

So this tutorial is quite welcome.

Re: Your First iOS App – 100% Programmatically

#14
post #4

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 exampl…

Why 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.

Re: Your First iOS App – 100% Programmatically

#16
post #13

So, a word of advice to new folks trying out iOS land: Interface Builder is most emphatically your friend. The compile/debug cycle in iOS is sufficiently lengthy that laying out views programmatically gets very tedious very fast. Besides realtime previewing of exactly how your view is going to look , IB also helps you understand how your layout is affected by rotations to landscape and differences in view height betw…

"There's enough tedious code to wrangle in iOS as it is – don't create more for yourself by rejecting a mature, useful tool." That's probably true. But some of us learn better by doing the tedious bits (basically less magic) to see how everything works together, and then look for the path to remove the tedious bits (which would lead to using IB) once we have a better grasp of things. So this tutorial is quite welcome…

Oh yeah – you should totally understand how the magic works. But there's an odd strain of fear against IB, so it bears mentioning.

Re: Your First iOS App – 100% Programmatically

#17
post #4

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 exampl…

The 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.

Re: Your First iOS App – 100% Programmatically

#18
post #3

Earlier quoted context omitted.

I agree with pretty much everything you say (especially now Apple will be pushing auto-layout for newcomers to the platform), but the one thing that's really bothered me with the "Your First iOS App" tutorial is that as some point it switched from NIBs over to a full Storyboard. And Storyboards are certainly in principle a cool idea, but I've never seen a production app that has actually used them (please do correct…

Yeah, Storyboards are still in their awkward phase. That's totally fair. And I don't yet trust them for running view navigation. But you know what they're awesome for? Static table views . If you want to build a grouped table view as login view, settings panel or the like, Storyboards are perfect. I'm also a big fan of Storyboards for prototyping. You can get to a pretty good fidelity demo of your app's information a…

Half the stuff on my storyboards aren't even connected. I treat it like a big nib file. It's excellent for having everything displayed in front of you, in one place, and you can add segues and other storyboard magic as needed.

Re: Your First iOS App – 100% Programmatically

#19

So, a word of advice to new folks trying out iOS land: Interface Builder is most emphatically your friend. The compile/debug cycle in iOS is sufficiently lengthy that laying out views programmatically gets very tedious very fast. Besides realtime previewing of exactly how your view is going to look , IB also helps you understand how your layout is affected by rotations to landscape and differences in view height betw…

I jumped into iOS dev after storyboards so, I fear nibs... I've never used one. If I started with a storyboard, should I throw in nibs every now and then for certain tasks??

Re: Your First iOS App – 100% Programmatically

#20
post #3

So, a word of advice to new folks trying out iOS land: Interface Builder is most emphatically your friend. The compile/debug cycle in iOS is sufficiently lengthy that laying out views programmatically gets very tedious very fast. Besides realtime previewing of exactly how your view is going to look , IB also helps you understand how your layout is affected by rotations to landscape and differences in view height betw…

I agree with pretty much everything you say (especially now Apple will be pushing auto-layout for newcomers to the platform), but the one thing that's really bothered me with the "Your First iOS App" tutorial is that as some point it switched from NIBs over to a full Storyboard. And Storyboards are certainly in principle a cool idea, but I've never seen a production app that has actually used them (please do correct…

Our app has ~15 view controllers laid out in a single storyboard, and we haven't had any issues with them. We only have one iOS developer, so I don't know if that makes a difference.

We don't really use segues, though, since they seem to add complexity if you want to pass data around between the view controllers.

Post reply on HN