Cyandev's Avatar

Cyandev

@unixzii.bsky.social

Gen Z. Internetrovert. No-stack engineer. UX enthusiast. Console gamer. Curiosity-driven learner. The rebel. He/him πŸ³οΈβ€πŸŒˆ. Stand w/ πŸ‡ΊπŸ‡¦. Opinions are my own.

29 Followers  |  8 Following  |  5 Posts  |  Joined: 07.11.2024  |  1.3465

Latest posts by unixzii.bsky.social on Bluesky

Can’t believe that #Swift still doesn’t have β€œarray” in 2024. 🀣

github.com/swiftlang/sw...

21.11.2024 07:40 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

You can use branded types to fully leverage #TypeScript, enabling type-checking for everything - even a simple string!

17.11.2024 18:47 β€” πŸ‘ 9    πŸ” 1    πŸ’¬ 1    πŸ“Œ 1
LLDB console that shows a SwiftUI layer object in UIKit view hierarchy.

LLDB console that shows a SwiftUI layer object in UIKit view hierarchy.

Fun fact: UITextView is now using #SwiftUI to render its contents 🀯 #iosdev

08.11.2024 16:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
let moonCGPath = CGPath(
ellipseIn: .init(x: 0, y: 0, width: 100, height: 100), transform: nil).subtracting(CGPath(
ellipseIn: .init(x: 40, y: -10, width: 80, height: 80), transform: nil))
// Serialize the Path to a String.
let moonPath = Path(moonCGPath)
let serializedMoonPath = String(moonPath)
print(serializedMoonPath)
// Deserialize a Path from the String.
let deserializedMoonPath = Path(serializedMoonPath)
assert(deserializedMoonPath != nil)

let moonCGPath = CGPath( ellipseIn: .init(x: 0, y: 0, width: 100, height: 100), transform: nil).subtracting(CGPath( ellipseIn: .init(x: 40, y: -10, width: 80, height: 80), transform: nil)) // Serialize the Path to a String. let moonPath = Path(moonCGPath) let serializedMoonPath = String(moonPath) print(serializedMoonPath) // Deserialize a Path from the String. let deserializedMoonPath = Path(serializedMoonPath) assert(deserializedMoonPath != nil)

TIL, #SwiftUI Path implements LosslessStringConvertible, so you can serialize and deserialize paths easily. CGPath can also have this with the help of SwiftUI Path.

08.11.2024 09:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@main
struct Cyandev: Bluesky {

07.11.2024 13:16 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@unixzii is following 8 prominent accounts