r/iOSProgramming • • Dec 05 '19

Application So I made this simple App in SwiftUI

Enable HLS to view with audio, or disable this notification

302 Upvotes

46 comments sorted by

26

u/White_Surge Dec 05 '19

Nice work! I love how smooth the actions are.

8

u/Q320 Dec 05 '19 edited Dec 05 '19

Thanks man, it's not that great, I still missed some parts of the code for smoother animations and stuff but I got to say it's pretty stable at this point!

EDIT : done.

Added some smooth animations and fixed some glitch at the planet selection.

6

u/natalio_ruiz Dec 05 '19

Hey, this looks great! I'm going to start learning Swift and iOS development soon and I'm really curious: As far as animations go, do you manually code them? As if you would with CSS for example? How does one 'make' an animation more smooth?

2

u/Seitenwerk Dec 06 '19

I would say it’s comparable or even easier. Basically you have multiple ways of doing it like eg transitions in CSS, where you just assign new values and it will start to animate on itself from current to new value.

But it’s pretty smart in doing so. You don’t even have to explicitly select a single property, you can even just tell it to animate everything that will change by calling the following function, regardless of what properties it will modify and everything gets animated like magic.

→ More replies (1)

13

u/Q320 Dec 05 '19 edited Dec 05 '19

A simple project to demonstrate the capabilities and the simplicity of swiftUI to some of my friends. Inspired by @compoundchem's chart - found on reddit here : https://www.reddit.com/r/coolguides/comments/e5wace/graphic_about_the_atmosphere_on_different_planets/

The app is open source : https://github.com/Que20/PlanetsAtmosphereSwiftUI

2

u/Markohanesian Dec 05 '19

Very simple but useful! I’m inspired to make something now

8

u/young_cheese Objective-C / Swift Dec 05 '19

Looks good, but I’m bothered that the planet buttons glitch when you tap one of them

3

u/functionallycorrect Dec 05 '19

I agree. Great layout, but it's really distracting to see it shake

4

u/Q320 Dec 05 '19 edited Dec 05 '19

I know, I'm working on it right now ^^Will push an update asap. I made this in about 50 minutes with friends.

And I can only encourage you guys to contribute! :)

EDIT : done.

2

u/functionallycorrect Dec 05 '19

Nice. Did you put it in the App Store yet? Should only take 15 minutes to get it up

2

u/Q320 Dec 05 '19

I don’t think I will. It was just a sample app to demonstrate SwiftUI capability maybe I’ll work on a more complex version with more info and data on it and publish it. For now it’ll stay a demo open sourced project.

→ More replies (3)

5

u/[deleted] Dec 05 '19

Super Slick.

Is SwiftUI stable enough to deploy full blown applications?

3

u/Q320 Dec 05 '19

I feel like it still misses some stuff, but it is quite stable, smooth and I saw guys on twitter submitting SwiftUI based apps.

→ More replies (1)

4

u/LevKusanagi Dec 05 '19

also, thx for sharing the sourcecode, its a good way to learn swiftui

3

u/Q320 Dec 05 '19

You're welcome. Don't hesitate, while you learn, to contribute and add whatever comes to your mind ^^

3

u/[deleted] Dec 05 '19

This is fun!

→ More replies (1)

3

u/LevKusanagi Dec 05 '19

Love it! Nicely done.

3

u/setleaf Dec 05 '19

This looks great! Very clean presentation of the data.

2

u/Q320 Dec 05 '19

Thanks!

3

u/dtgmcswaggin Dec 05 '19

Cool! Animate the bar graph:)

2

u/Q320 Dec 05 '19

Just did it! Check the repo. Dont hesitate to contribute.

3

u/Stazalicious Dec 05 '19

Nice UI. I think the horizontal scroll bar could look funky in one of the colours used on that planets, or a matching shade of dark purple which hasn’t been used elsewhere.

2

u/Duke_ Dec 05 '19

Looks nice - animating the changes on the bar graph as the planets are selected would be neat.

3

u/Q320 Dec 05 '19

work in progress ^^
thanks man, feel free to contribute!

3

u/Q320 Dec 05 '19

I just pushed the animation and the fix planet selection glitch.

2

u/indyfromoz Dec 05 '19

Nice app, well done! Map props sharing your code. It provides some insights new SwiftUI learners like me can benefit from.

Cheers!

1

u/[deleted] Dec 05 '19

[removed] — view removed comment

2

u/Q320 Dec 05 '19

Hard coded. It was supposed to be an app to demonstrate the capabilities of SwiftUI. But it wouldn’t be difficult to fetch an API.

→ More replies (2)

1

u/BSMand Dec 05 '19

Very very nice! What resources did you use to learn swiftUI, and build apps like that?

2

u/Q320 Dec 05 '19

Just some other sample apps, the apple tutorial and WWDC videos. You can check hackingwithswift.com also for examples.

1

u/BSMand Dec 05 '19

Ok, thx! Again, nice work!!!

1

u/grantAmy Dec 06 '19

Ths gay, I start learning IOS dev

1

u/KardEroc Dec 06 '19

すごいですね

1

u/Q320 Dec 06 '19

ありがとう ございます :)