Skip to main content

Questions tagged [swiftui]

SwiftUI is an Apple framework for building user interfaces using a declarative Swift syntax.

Filter by
Sorted by
Tagged with
1 vote
0 answers
47 views

I'm building a SwiftUI screen that displays a list of notifications, using a ViewModel to handle state and API calls. The screen is fairly straightforward: it has a header and a paginated notification ...
Bhavesh.iosDev's user avatar
0 votes
0 answers
51 views

For getting familiar with SwiftUI NavigationSplitView, I created a prototype, which implements a three-column view. Screenshot: Code (View): ...
michael.zech's user avatar
  • 5,042
1 vote
0 answers
85 views

I'm creating a Settings-form in SwiftUI. One of the expected values is a double. I tinkered with NumberFormatter, but it didn't work well for me. Moreover I had to find a way making invalid values ...
michael.zech's user avatar
  • 5,042
4 votes
1 answer
239 views

The given task is to implement a time-units app. I guess I got the main logic right, but concerning the UI-coding there could be improvements. Here's my code: ...
michael.zech's user avatar
  • 5,042
3 votes
1 answer
78 views

I've written a simple list in SwiftUI that accepts a generic data type. The goal was to make a reusable list where when an item was selected, the list would execute a callback with the selected data. ...
dubbeat's user avatar
  • 131
5 votes
1 answer
711 views

I have implemented the Caesar Cipher in Swift and incorporated it into an iOS-app. I guess it's formally correct. Please see the attached images, which show how the usage of the app is meant. Here's ...
michael.zech's user avatar
  • 5,042
3 votes
1 answer
252 views

I have a Timer in my View right now, but I want to move it outside to my ViewModel-class. I have experimented a bit and came up with a working solution. The code works and produces expected output, ...
irrbloss's user avatar
  • 133
2 votes
1 answer
391 views

just wanted someone to review my code and perhaps simplify it a bit. Everything is working as expected for the moment but it seems too much code for what i'm trying to achieve. Especially the function ...
Bjorn Morrhaye's user avatar
1 vote
1 answer
134 views

I have this view in SwiftUI; it works as expected, and for the most part, works great. My only concern with it is that it feels extremely clunky. Reading through the view itself is very difficult. ...
xTwisteDx's user avatar
  • 111
3 votes
1 answer
169 views

For a job in company I had to do a code assignment. My assignment performs all the required tasks needed to be done. But after one month the company provided me a feedback and said that we have ...
Cluadia Hedda's user avatar
-1 votes
1 answer
612 views

I am learning Swift and just had a quick question about use of parentheses. The code below runs just fine w/o using parentheses, but it certainly looks a lot cleaner using them in this instance. So my ...
r00's user avatar
  • 9
2 votes
0 answers
1k views

Due that fact that SwiftUI has poor ScrollView customization and doesn't support snap interval from the box I decided to implement my custom component to support ...
Roman Mahotskyi's user avatar
2 votes
0 answers
168 views

Inspired by Mike Boyd's 'Dopamine Box' video: link, I decided it would be a good project to pursue by myself in swift. The end goal is to make it look like the box in the video, with switches and a ...
PhillipT's user avatar
2 votes
1 answer
589 views

I decided to write a simple tab bar for macOS using Swift. tabs.swift ...
shreyasm-dev's user avatar
4 votes
0 answers
645 views

I'm finding it difficult to decide on the best architectural pattern for a SwiftUI app but, for the moment, I'm sticking with MVVM as I found this a good fit conceptually. I'm trying to avoid the ...
rustproofFish's user avatar
3 votes
1 answer
129 views

I created a music player using swiftUI.I need to ask a question when I break up my player into usable components. How should I take this approach with the music player? because the music player is one ...
NinjaDeveloper's user avatar
3 votes
1 answer
3k views

I want to understand if I got this concept correctly. I should start work from ViewState; a reference type object holding the state of a view. Here it is called <...
fewlinesofcode's user avatar
3 votes
0 answers
303 views

I have 2 asynchronous return values from 2 different classes, one from HealthKit, the other from MotionManager. I combine the outcome of these classes through a combinedViewModel. The code works, but ...
Bjorn Morrhaye's user avatar
6 votes
2 answers
2k views

This is my code to solve the challenge in 100 Days of SwiftUI by Paul Hudson. This is the first challenge in the series and I chose to convert the temperature units from C° -> F°, F° -> C°, C° -> K° ...
Kareem Moustafa's user avatar
5 votes
1 answer
815 views

I am using a set of data points (currently randomly generated), and drawing a line graph inside a box: ...
coco's user avatar
  • 161