Live data from Hacker News

iOS Development Tips If You're Just starting Out

stuartkhall.com

91–100 of 105 posts

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

#91
post #71

Earlier quoted context omitted.

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?

Being fairly new to this, and doing a large amount of experimenting, I enjoy being able to quickly mockup a (sort of) working prototype, without having to type too much code. During the learning process, you just want an interface, and not much else.

I guess it comes down to workflow, and that's always a personal thing.

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

#92

If you use ARC from the start, then can you really understand block retain cycles (which are just two bullet items below)? I would absolutely try to write one or two "Hello World" apps without ARC first. CMIIW but Xcode will highlight any instance where you do things differently than ARC would, there is plenty of feedback on what you are doing. And once you feel confident enough, upgrading the project just takes a fe…

I love your advice: start out learning how to manage memory and it only gets easier. While ARC is great compared to manual memory management, it doesn't work on non-Objective-C object, such as CFRefs (when dealing with sound, for example).

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

#94
post #3

Utilizing storyboards and xibs is one of the best way to decrease development time. Stop the coding madness!!!! The only people I still know that avoid heavy utilization of these do not understand how to properly use them. Go learn!

Totally agree. It's well worth working closely with your designer to make your interface work with nibs, not against them. Little things like putting button icons on the left side of the button and putting a 20px gutter between elements add up fast.

That's actually a good way to see if your designer knows how to create a design within the conventions of the platform. Violating too many of a NIBs conventions tends to mean either a game (not really going to use NIBs) or something that will be hard on the users.

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

#95

Earlier quoted context omitted.

AppCode does exactly the kind of source cleanup you describe. It also manages #imports for you, has better code completion, provides a more useful debugger, and gives you refactoring tools almost as good as those available for Java. You can only do iOS dev on a Mac so I don't understand why you consider that an AppCode negative. Considering how much my time is worth as an iOS dev the $99 I spent for a personal licens…

I'm doing development at a startup which means minimal funding and a $200 license. My main development system is running Linux and I do development of client side Android and iOS, plus server side (mostly Python), web, database etc. AppCode only helps for one of those, and would be more valuable to me if it ran on non-Mac platforms even just as a better Objective C editor. Note that I do do iOS dev on a Mac but I use…

FWIW, RubyMine does notice when a file has been modified on disk. If you have unsaved changes in RubyMine, it pops up an alert that lets you pick which to keep or to diff the two; if you don't have changes it just refreshes and shows the version on disk.

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

#96

Earlier quoted context omitted.

The replacement is definitely the article's first suggestion: Cocoapods. Cocoapods is awesome and is rapidly being adopted by major repositories like AFNetworking, Kiwi, TTTAttributedLabel, MagicalRecord, and more: http://www.cocoacontrols.com/cocoapods It has been super easy compared to git submodules.

Do you have a non-Apple-specific suggestion? We do cross platform development, so Cocoapods aren't an option.

Unfortunately, no.

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

#97

Earlier quoted context omitted.

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

Yes, I'm aware of this. I was simply clarifying the pricing is not $200, but $100 for a single-person license. There has been confusion in the past regarding this, people assuming that if you use one of their products for business, you must purchase a company license. Even if you only use AppCode for work stuff, you do not need to purchase a company license.

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

#98

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…

Another reason to seriously consider using nibs instead of hand coding UIs is Auto Layout. It is way easier to deal with that API in IB. Of course you can in code too. But every new API has its problems. Most commonly, they're a pain to deal with due to unexpected behaviors and incomplete documentation. You all have been warned! ;)

Auto Layout is pretty much the only reason nowadays I'd use nibs at all. Unfortunately, they are iOS6 only. If you want to support the previous major version you'll have to wait until iOS7 before you can really use that.

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

#99
Can someone explain to me why I should use dispatch_once at all when a simple check whether the static variable is nil would suffice? It always seems so cluttered.

Compare this:

  + (MyClass *)sharedClass {
      static MyClass *_shared = nil;
      static dispatch_once_t onceToken;
      dispatch_once(&onceToken, ^{
          _shared = [[MyClass alloc] init];
      });
      return _shared;
  }
...to this:

  + (MyClass *)sharedClass {
      static MyClass *_shared = nil;
      if (!_shared)
          _shared = [[MyClass alloc] init];
      return _shared;
  }
Is there any difference regarding performance?
Post reply on HN