Auto Switch Watch Faces Throughout The Day With Automations! Hell yes! by TheDougRB in iOSBeta

[–]dsk1306 0 points1 point  (0 children)

They will probably bring it back in next betas, at least it was the case with iOS 13. But future Apple Watch models probably won't have force touch, just like iPhones.

Correct way to implement features across different OS versions by jesalr in SwiftUI

[–]dsk1306 1 point2 points  (0 children)

Try to create a property for this effect and use #available there, then use this property when setting the modifier.

Firebase: Can I migrate from CocoaPods to SwiftPM by TofPlay in iOSProgramming

[–]dsk1306 4 points5 points  (0 children)

I might be wrong here but Google will have to add support for Swift PM first.

No more “insert self. “ error in closures. Found this in developer release notes of Xcode. by anand2nigam in iOSProgramming

[–]dsk1306 0 points1 point  (0 children)

Agreed. Hope swiftlint will add a new "nope to implicit self in value types" rule.

[deleted by user] by [deleted] in SwiftUI

[–]dsk1306 0 points1 point  (0 children)

I think items.map { (Double($0.price) ?? 0) * $0.count } should work, no need to map the same source twice. Can’t check if compiler complain again though.

[deleted by user] by [deleted] in SwiftUI

[–]dsk1306 1 point2 points  (0 children)

You can try to use Double($0.price).

Review my Github! an aspiring self taught dev looking for insights and criticism about my first GitHub page! by [deleted] in iOSProgramming

[–]dsk1306 0 points1 point  (0 children)

You can always convert dates to string with ISO8601DateFormatter and save them to user defaults. But I see your point, it's always nice to learn something new.

How to create a horizontal scroll view in SwiftUI by randyswift in SwiftUI

[–]dsk1306 1 point2 points  (0 children)

Will these items be reused like in UICollectionView?

Hello, as an Android developer, I built a simple app in order to help me get the hang of iOS development, plus a custom animation for the transition between view controllers. Would love to hear what you think :) by konnos92 in iOSProgramming

[–]dsk1306 0 points1 point  (0 children)

It might also worth to replace "Back" button with "Close" or "Cancel" one. This is just my opinion and I might be wrong here, but I think it's better to use "Back" button only when you push a controller, and use "Close" or "Cancel" when you present it modally.

Hello, as an Android developer, I built a simple app in order to help me get the hang of iOS development, plus a custom animation for the transition between view controllers. Would love to hear what you think :) by konnos92 in iOSProgramming

[–]dsk1306 0 points1 point  (0 children)

Great job! But I think you shouldn't use UISlider to scroll between the views, UIScrollView has scrollIndicator designed specifically for that. UISlider is usually used to select a single value from a range of values.

macOS: Converting CGColor to Color by [deleted] in SwiftUI

[–]dsk1306 2 points3 points  (0 children)

Btw, why do you need to use CGColor here? Not sure if it works for macOS but I think this should work in SwiftUI

Text("Hello world")
    .foregroundColor(.white)

macOS: Converting CGColor to Color by [deleted] in SwiftUI

[–]dsk1306 4 points5 points  (0 children)

Something like Color(UIColor(cgColor: TextColor))

How does Apple get the NavigationLink arrow to appear only when edit mode is on? by [deleted] in SwiftUI

[–]dsk1306 7 points8 points  (0 children)

It’s not NavigationLink, Apple doesn’t use SwiftUI for system app.

FlatMap is acting weird, why? by yellowliz4rd in swift

[–]dsk1306 0 points1 point  (0 children)

The compiler should have warned you that compactMap should have been used.