Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
-1 votes
2 answers
106 views

I have a Swift model using Codable, and my backend is inconsistent with date formats: Sometimes a date comes as ISO8601 string ("2025年09月30日T04:00:00Z") Sometimes as a Unix timestamp (...
0 votes
1 answer
27 views

I've been trying to wrap my head around Swift's property wrapper. The documentation's code, defined as follows, works fine: @propertyWrapper struct TwelveOrLess { private var number = 0 var ...
Fopoki's user avatar
  • 57
3 votes
1 answer
201 views

I just learned about Swift's property wrappers from Nick Sarno's YT video and they seem pretty cool. I'm investigating and I created a property wrapper to uppercase a string: @propertyWrapper struct ...
0 votes
0 answers
42 views

I need some help from my colleagues because I can't handle it on my own. I am stuck. I have a database on Firebase with training programs in it. ProgramsID loads the list of trainings. Here's how the ...
3 votes
1 answer
292 views

I need the wrappedValue in TextField to be immediately uppercased as text is entered. In this video, it works: https://www.youtube.com/watch?v=aQE3kbCA0nk&ab_channel=SwiftandTips But here, for ...
-1 votes
1 answer
166 views

Body will recompute(rerender) only when source of truth changes far as I know. Question 1: Will changing of source of truth ALWAYS trigger reinitialization and rerender combined? Question 2: Is it ...
-1 votes
1 answer
115 views

struct MyStruct { @ArrayOfNonOptionalElements var arr: [SomeNonOptionalType] } where @ArrayOfNonOptionalElements is a propertyWrapper. So, how to force non-optionality for the type inside? Is it ...
0 votes
3 answers
159 views

@StateObject & @StateObject in Both Parent and ChildView import SwiftUI class Counter: ObservableObject { @Published var count: Int = 0 func increment() { count += 1 } } ...
-2 votes
1 answer
121 views

Consider this code in which I'm trying to continuously animate a set of circles from red to blue: struct ContentView: View { let timer = Timer.publish(every: 1.0, on: .main, in: .common)....
2 votes
2 answers
460 views

I am struggling to create a swift struct, where I can use a property wrapper to decode some JSON that sometimes requires a value to conform to a specific type, but other times may become a dictionary ...
1 vote
0 answers
102 views

So the thing I want to do is that I have an api call if it fails I show an alert with message, OK button and Retry Button. Everything is working good but when I do retry it don't shows the alert again ...
7 votes
1 answer
2k views

I have a class which is similar to: final class Person { @Resettable var name = "John Doe" func revertName() { name = $name } } @propertyWrapper struct Resettable&...
0 votes
1 answer
380 views

In Swift, you can specify a union type using an enum. For example: enum IntOrString { case int(Int) case string(String) } Now I want to write a property wrapper, which I can apply to ...
0 votes
1 answer
189 views

Situation During migration of some UIKit view classes to SwiftUI, I have faced next case: I have a simple view class, responsible for data fetching and displaying. Its structure is pretty simple and ...
-1 votes
1 answer
109 views

I have an app that is outlined in the following. Most of the code I have adapted from https://www.hackingwithswift.com/books/ios-swiftui/how-to-combine-core-data-and-swiftui But the part I have ...
Dogahe's user avatar
  • 1,425

15 30 50 per page
1
2 3 4 5
...
10

AltStyle によって変換されたページ (->オリジナル) /