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

Show parent comment

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.

1

u/SgtDirtyMike Sep 01 '19

Interesting. I super appreciate your suggestion. Do you have any documentation on this? Not sure if it's the expected behavior. Working on my end too, but it doesn't make any sense to me why.

1

u/youngermann Sep 01 '19

lineLimit() specifies how many lines to display. It’s clear by its name. The default used to be 1, but changed to nil for unlimited. It works as expected.

I don’t know anymore than SwiftUI doc.

1

u/SgtDirtyMike Sep 01 '19

No it doesn’t. You shouldn’t have to set it twice to truncate at 1 or 4 lines. That makes no sense.

1

u/youngermann Sep 02 '19 edited Sep 02 '19

Not twice. It individually used in two different Text(). I said that above already. It works for me.

Good luck finding out what’s wrong.

1

u/SgtDirtyMike Sep 03 '19

Reason I am frustrated is I tried setting line limit twice and the issue I was having is fixed now. It's a super basic view too with just an HStack with an image with a caption title and subtitle. Case and point - SwiftUI is still quite buggy.

4

u/Dynoman Aug 31 '19

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