Live data from Hacker News

iOS Development Tips If You're Just starting Out

stuartkhall.com

81–90 of 105 posts

Re: iOS Development Tips If You're Just starting Out

#81
post #71

Earlier quoted context omitted.

> In all the teams I've worked on, designers have worked out pixel positions and text alignment by the time I see the mocks. I don't find much value in realtime feedback. Very few beginner iOS developers will have a design team at their beck and call.

But some of us are both ;)

And what do you think of NIBs, from the perspective of each of those two hats you are wearing?

Re: iOS Development Tips If You're Just starting Out

#82
post #80

Earlier quoted context omitted.

> It's worth it for the refactoring and #import management alone. That is something Eclipse does out of the box! Apple really disappointed me with Xcode - it is actually less usable than Eclipse in my experience. This is not praise of Eclipse - it has many issues!

Xcode has refactoring support.

In my experience, it's extremely basic. Yes, it can rename a function or variable, but that doesn't compare to AppCode.

AppCode can do both of those. Want to add a new parameter to a function? AppCode can do that, and put in a default value for you everywhere. Signature modifications are a snap. Plus it searches for possible references to the function you're modifying and can suggest fixes for them too. That alone is with the $99.

Re: iOS Development Tips If You're Just starting Out

#83
I would highly recommend downloading and installing DCIntrospect[0]. It's designed to let you tweak layout in the simulator, but what it's really useful for is probing the UI in large, complex apps. Need to tweak the font size on a specific element, but you have no idea what that view class is? Enable DCIntrospect, click on the element, log its class name and properties. This has saved me, literally, hundreds of hours of debugging time over the years.

[0] https://github.com/domesticcatsoftware/DCIntrospect

Re: iOS Development Tips If You're Just starting Out

#84

Earlier quoted context omitted.

These used to be binary and so they'd not play well with version control. Is this fixed?

They are XML now but they are so volatile that merging is still a pain in the ass.

But storyboards read and merge very nicely, in my experience.

With two caveats: - the classes section will sometimes be removed by IB. Ignore it - the last section, inferred something (priority? segues? metrics?) with 5-6 entries, can cause the storyboard to be unopenable. So, when merging, if there are changes to that section in both versions, just delete the contents of the section.

Re: iOS Development Tips If You're Just starting Out

#86
post #5

Pretty good tips. Re: being aware of retain cycles -- this is not just for blocks but really in general. When you start out you should immediately learn the conventions and adhere to them strictly. (Unfortunately the APIs don't always, I'm looking at you NSURLConnection!) Another tip: try both Xcode and AppCode: http://www.jetbrains.com/objc/ . It's a subjective thing but for myself AppCode is far better (it helps th…

As annoying as Xcode can be sometimes, I can't stand AppCode. It doesn't feel like a native app, and it seems very fiddly and even less user friendly than Xcode.

Re: iOS Development Tips If You're Just starting Out

#87
post #71

Earlier quoted context omitted.

> In all the teams I've worked on, designers have worked out pixel positions and text alignment by the time I see the mocks. I don't find much value in realtime feedback. Very few beginner iOS developers will have a design team at their beck and call.

But some of us are both ;)

Quite so! As a beast of just such a color, I love nibs. Huge timesaver, especially when configuring custom buttons with different image and label alignments.

Re: iOS Development Tips If You're Just starting Out

#88

As long as the beginners are drifting by, lemme say this: Every nib you use is a boatload of code you don't have to maintain. Use nibs. Can they solve every problem? Goodness no. But they're a great way to get the basics of your views laid out. They give you an easy way to preview the behavior of your view when layout changes. And they're very forgiving when you change your mind. Changing text alignment? One click. W…

I find that nibs are more difficult to maintain than creating views in code. You'll spend a lot of time trying to figure out where something is set since you can't do a global search & replace on nibs. If you avoid magic numbers, it's easier to change positions in code without lots of fiddling around.

Since I used Cocos2d (which doesn't use nibs) in one of my games, I was able to update it very easily for the iPhone 5 (despite using some magic numbers) by simply using a multiplier based on the screen size.

Re: iOS Development Tips If You're Just starting Out

#89

Earlier quoted context omitted.

I haven't but I did look at the page as it was linked in the article. I never saw any mention of code formatting. An example of what I expect is like the Eclipse Source > Format option which will go in and make everything consistent including making lines less than 80 chars, adding space around operators (I never put in spaces which goes against almost every style guide), ensuring the arms of if/else always have brac…

AppCode is $100. $200 is you purchase a company license, which means anyone at the company can use it. If you are the only person using it, you only have to pay $100.

AppCode is $100 if you make the purchase using your own money and are not reimbursed in any way by the company. I try to keep work and personal stuff very separate and have no personal need for AppCode. $100/200 is still pretty steep for a code reformatting tool!

"If you, as an individual, are purchasing a product license using your own funds, then the personal license is right for you.

Personal licenses are not available to companies in any way or form. Transfer of personal licenses to any third party and/or reimbursement for personal license purchase by a company are prohibited by the Personal License Agreement."

Post reply on HN