r/iOSProgramming • • Aug 30 '19

Application Might not be super impressive, but we're developing an app in SwiftUI and this is our hierarchy so far.

Post image
123 Upvotes

75 comments sorted by

View all comments

48

u/USERNAME_ERROR Aug 30 '19

On a scale of 0 to 10, how likely are you to recommend SwiftUI to a friend or colleague?

46

u/LetsYouKnow Aug 30 '19

Depends on the type of app you're going for, but I'd definitely recommend it once it's out of beta. 9/10.

8

u/USERNAME_ERROR Aug 31 '19

Thanks for letting me know.

0

u/[deleted] Aug 31 '19

[deleted] — view deleted comment

34

u/etaionshrd Objective-C / Swift Aug 31 '19

Ever tried to solve a storyboard merge conflict?

→ More replies (1)

9

u/antekm Aug 31 '19

One thing is for example core reuse. As everything is composed from smaller parts, it's very easy to take some part of ui and use it in another place, even if you didn't plan for it initially. It's much harder to do so in storyboard - imagine you spent few days creating some complicated screen and then get a new requirement to make another one like this but with some significant differences, or take just some part for reuse. It's not trivial!

2

u/wiencheck Sep 01 '19

Yeah but you can create separate components in xib and just piece them together in storyboards. They are easy to reuse too. I don’t get the Interface Builder hate, it is very easy to use and you can see the effects instantly, merge conflicts can be a PIA but there are nice tools to help with that and if you’re working alone this is a non-issue

Just my 2c

2

u/antekm Sep 05 '19

It is an option if you think about it beforehand. If you first create the whole screen in a storyboard and later decide that you'd like to reuse some part of it, it's much more painful to do

→ More replies (1)

3

u/Svobpata Aug 31 '19

7

It has a big potential but it’s not really ready for production yet. ScrollViews are broken in a lot of ways, NavigationView has problems with the navbar not shrinking and losing its title.

1

u/AberrantRambler Aug 31 '19

I’m not gonna lie - if that “feature” of nav bars went away I wouldn’t shed a tear over it.

0

u/[deleted] Aug 31 '19

[deleted] — view deleted comment

2

u/AberrantRambler Aug 31 '19

You misunderstand - I mean just the “feature” of nav bars (that they added in iOS 10 I think) where the title on the nav bar starts really big and then shrinks as you scroll down.

1

u/Svobpata Aug 31 '19

Ooh, sorry, I kinda like the big title bars tbh. For people like you, I’ll leave an option to turn them off in my app.

6

u/juniorRubyist Swift Aug 31 '19

3.

25

u/USERNAME_ERROR Aug 31 '19

Well you clearly are just a junior ruby dev.

1

u/juniorRubyist Swift Aug 31 '19

I used to program in ruby. I’m actually a student btw. I prefer python and iOS now.

12

u/USERNAME_ERROR Aug 31 '19

I was just poking fun at your username. Why 3 tho?

3

u/juniorRubyist Swift Aug 31 '19

I tried out SwiftUI and it doesn’t support navigation really well. It’s also really slow in Xcode. I’ll have to try it again though.

9

u/SgtDirtyMike Aug 31 '19

Slowness is not an issue. Must be your Mac or XCode install. My issues with it are that it's extremely tricky to exactly replicate certain things that you can do with a storyboard. Some of the methods simply don't work and documentation is lacking in a lot of areas. For example .lineLimit just basically doesn't work on Text views.

3

u/juniorRubyist Swift Aug 31 '19

I totally agree with storyboards being better.

1

u/youngermann Aug 31 '19

Text().lineLimit(1) lineLimit(4) works for me for Watch and iPhone.

1

u/SgtDirtyMike Aug 31 '19

What part about this works? You have to set the line limit twice? Still super buggy.

1

u/youngermann Sep 01 '19

Not twice. I’ve used it for both cases and it works: it truncates at one line or at 4 lines.

→ More replies

4

u/Dynoman Aug 31 '19

The betas are always slow though, but of course Xcode is really slow with storyboards and xibs too.