4

I've been using Interface Builder almost exclusively ever since Apple introduced autolayout for iOS.

I recently came across SnapKit but I don't see any immediate advantage this has over using constraints in IB. The only thing it's got going for it is resolving merge conflicts in a larger team (merge conflicts in IB are a pain to deal with).

Does anyone, who has used both SnapKit and IB, know why SnapKit would be preferable?

Sid
  • 9,498
  • 5
  • 36
  • 59

1 Answers1

2

For anyone who needs an answer to this question, after using both for a while, I found no real reason for using one above the other. SnapKit doesn't really solve any problems inherent with IB. It all boils down to user preference, though my personal recommendation is to stick to IB because that is the standard layout tool and it's very powerful.

If you're using SnapKit just because IB seems intimidating, I think it's worth the time and effort to learn the IB basics (it should really take only a day or so).

Sid
  • 9,498
  • 5
  • 36
  • 59
  • 2
    SnapKit is a library that simplifies layout code. A lot of people don't use Interface Builder because it causes a lot of trouble when working in teams - merge issues in particular. The regular API from Apple is very verbose and SnapKit provides a much more lightweight API as a replacement. – Kai Engelhardt Jun 22 '17 at 08:08
  • @KaiEngelhardt those are valid points, but I've been able to work my way merge issues with NIB files fairly well. When we plan our work, we account for the possibility of merge issues with NIB files and try to keep UI work mutually exclusive. It's worked out well so far. – Sid Jul 20 '17 at 17:24
  • 1
    I have never seen a serious company using IBs. – Simran Preet Singh Narang Jan 02 '18 at 20:17
  • Using 3rd party convenience libraries is a great way to have huge legacy issues in the future when Apple changes something in core. As it is now finding issues with Masonry and XCode 8 / iOS11 storyboards. Just learn to use constraints properly... you'll be a better developer for it. – DoctorDbx May 03 '18 at 23:33