Observable Macro
Swift | Reddit
by /u/johnthrives
1d ago
Instead of the Observable Macro, why can’t Apple make everything observable by default across the board? For example, instead of the KVOs of WKWebView just make it Observable by default to easily observe it with SwiftUI? Another example, make UIPasteboard observable by default instead of that notification listener from the Objective-C era so SwiftUI folks can easily observe the changes in Strings universally across all iCloud linked devices? Everything and anything should be easily observable for any use cases. submitted by /u/johnthrives [visit reddit] [comments ..read more
Visit website
Can't make a subview automatically refresh/listen for update to its observedObject core data related entity
Swift | Reddit
by /u/OnMyOwnWaveHz
1d ago
The parent view, NodeList, has FetchedResults from core data after connecting to a BLE device and takes each Node and passes it down to the subview NodeListItem to display a list. NodeListItem takes that ObservedObject node and displays its information. The BLEManager is an EnvironmentObject and uses another swift class UpdateCoreData to send and update data of all NodeInfoEntity nodes from the BLE device to the app. The NodeList view updates the list of nodes correctly only when the app is reopened again or the ble device is rebooted. How can I make the subview listen to updates of a specifi ..read more
Visit website
Error when attempting to exit app after using a SKLabelNode.
Swift | Reddit
by /u/JesseTheDogLover
1d ago
Hi, I'm making a Swift / Spritekit game and I have it every half second check if it's reached 2000$ of in-game money. If so, it should call nextChap() where it adds the reloadToContinue label, waits four seconds, then exits the app. However, when it actually tries to exit the app, I get the following error in my AppDelegate: Thread 1: "Attemped to add a SKNode which already has a parent: <SKLabelNode> name:'(null)' text:'The app 'IdleClicker' has requested to update it's code. The app will close momentarily...' fontName:'American Typewriter' position:{0, 0}" note: usleep(5) and self.dis ..read more
Visit website
Accepting any String, CaseIterable enum binding as a parameter for a view?
Swift | Reddit
by /u/hausuCat_
1d ago
Say I have an enum that looks like this: enum AnEnum: String, CaseIterable { case one = "One" case two = "Two" case three = "Three" // Explicit definition of allCases is for control over ordering in ForEach static var allCases: [AnEnum] = [ .one, .two, .three ] } I want to use this enum with a ForEach to create a list of each case. Something like this: VStack { ForEach(AnEnum.allCases, id: \.self) { case in Text(case.rawValue) } } However, I'm going to want to reuse this component that creates the list and add an interaction, so I want something like this: struct EnumChooser<T: Stri ..read more
Visit website
App resets NavigationStack when changing appearance (dark:light mode)
Swift | Reddit
by /u/Ill_Examination_1744
1d ago
My app uses SignInWithAppleIDButton, and I am handling the rendering of dark mode and light mode (surprised Apple isnt doing that by themselves)… What I am noticing is that if i am navigated deeper into my app, and i go to settings to change my phones appearance, it navigates me back to root view - is that normal? The @Environment(.colorScheme) property on my view, and the colorScheme == .light etc doesnt seem to work…. Only when I change it while being on root view. I really want to remove root view from my NavigationStack… submitted by /u/Ill_Examination_1744 [visit reddit] [comments ..read more
Visit website
How to make an CGAffineTransform permanent
Swift | Reddit
by /u/B8edbreth
1d ago
I'm scaling a UIView subclass using this : self.transform = CGAffineTransform(scaleX: width, y: height) once the transform is done I want the view's scale to be 1.0 submitted by /u/B8edbreth [visit reddit] [comments ..read more
Visit website
How do I remove street names in LookAround?
Swift | Reddit
by /u/TheBeaconCrafter
1d ago
How can I remove the street names in the MKLookAroundView? I tried this but it doesnt seem to work: struct LookAroundView: UIViewControllerRepresentable { @Binding var isExpanded: Bool @Binding var initialScene: MKLookAroundScene? func makeUIViewController(context: Context) -> MKLookAroundViewController { let lookAroundViewController = MKLookAroundViewController() lookAroundViewController.isNavigationEnabled = true // Enable navigation controls lookAroundViewController.showsRoadLabels = false // Hide road labels lookAroundViewController.pointOfInterestFilter = .excludingAll // Exclude ..read more
Visit website
Restarting RoomPlan's RoomCaptureView without dismissing the view?
Swift | Reddit
by /u/hausuCat_
1d ago
I'm implementing RoomCaptureView in an app and I'm having trouble with something I'm surprised to be having trouble with: resetting the process of scanning a room without completely dismissing the view. RoomCaptureView can be a bit error-prone at times, or maybe a user sees the 3D preview of their capture and decides they'd like to try it again. It seems as though the only way to go about this is to dismiss the whole view and reopen it. Have any of you by any chance found a solution for this? submitted by /u/hausuCat_ [visit reddit] [comments ..read more
Visit website
Some time ago, I started building an open-source alternative for Xcode in Neovim environment. If you love Neovim as much as I do, you may want to join and contribute ?. So far I was maintaining it alone, but if anyone wants to try, I would be happy to review some ideas and pull requests ?
Swift | Reddit
by /u/john_snow_968
1d ago
submitted by /u/john_snow_968 [visit reddit] [comments ..read more
Visit website
IOS fresher dev demand in India
Swift | Reddit
by /u/Doodyboy69
1d ago
Should I invest in getting a MacBook and invest in learning ios development to land a job? I'm more than willing to invest most hours of my day and building an app seems more challenging and interesting. Web Development is way too saturated in this country and the beginner salaries absolutely do not justify the time required to learn everything the recruiters expect. Most of my friends are clueless about IOS development so was wondering if I could bank on it. submitted by /u/Doodyboy69 [visit reddit] [comments ..read more
Visit website

Follow Swift | Reddit on FeedSpot

Continue with Google
Continue with Apple
OR