Questions tagged [ios]
iOS is an operating system for mobile devices developed by Apple Inc. that is currently used in their iPhone, iPod touch, iPad, and Apple TV (2nd generation) devices. It shares a lot with Mac OS X, but is optimized for touch-based interfaces. Use this tag for questions about iOS-specific code.
392 questions
1
vote
0
answers
41
views
Using a ViewModel in a simple SwiftUI screen with a list and API call
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 ...
1
vote
0
answers
49
views
SwiftUI NavigationSplitView three-column layout
For getting familiar with SwiftUI NavigationSplitView, I created a prototype, which implements a three-column view.
Screenshot:
Code (View):
...
1
vote
0
answers
84
views
SwiftUI: Handling number-inputs via TextField (actually String)
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 ...
6
votes
1
answer
216
views
Showing an audio waveform from sample audio data with user interaction for zoom in/out
I want to show an interactive audio waveform like this.
I've extracted the sample data using AVAssetReader. Using this data, I'm drawing a UIBezierPath in a Scrollview's contentView. Currently, when I ...
4
votes
1
answer
239
views
SwiftUI TimeUnits-Converter App
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:
...
3
votes
1
answer
66
views
Swift: Mocking a REST API-request
I have read the last two days through several tutorials about how to mock a HTTP-request against a REST API.
Finally I made a prototype for applying, what I have understood from the tutorials.
Here's ...
2
votes
1
answer
106
views
Show a list of downloads
I've been working on a Swift project that involves a seedbox app for my NAS, and I would appreciate some feedback on the code structure and especially on the placement of my observer. I've implemented ...
5
votes
1
answer
710
views
Caesar Cipher in Swift (iOS-app)
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 ...
1
vote
1
answer
99
views
Javascript CLI to boot iOS simulators, install project, extract data, and merge into JSON
I'm a DIY "dev" - so I really create things that I need or think they'll end up helping others.
I wrote this Swift Package so the iOS community could get device bezel radius' to help with UI ...
0
votes
0
answers
54
views
Good way to coding on React-Native?
I'm new on this field of coding, and I start to create by myself a project for iOS and Android. I'm a bit lost of how I supposed to organize my code, I saw different persons on YouTube doing their ...
3
votes
2
answers
135
views
Building a UITableView with fixed number of cells progammatically
I am building this pet project with UIKit. The App's main goal is to keep track of my daily expenses.
The AddExpenseViewController is responsible for capturing user ...
2
votes
0
answers
78
views
Refactoring of this massive ViewController with a UITableView in it
I'm making an application that has a UIViewController with a UITableView in order to show the favorite users that the user of ...
2
votes
1
answer
203
views
MVVM pattern in Swift
I've been coding for some time now and since I am working alone I'm not strict in my coding structure approach(bad idea) and was only focused on getting things done which resulted in MVC(MASSIVE-View-...
5
votes
3
answers
318
views
Sum of natural numbers below threshold
I have this code:
...
5
votes
1
answer
125
views
Function for formatting data retrieved from a battery via Bluetooth Low Energy
I have the following function in Swift and am looking to improve the readability. The function takes from the deviceData object which holds maps of data like ...