Bosco 🇨🇦🤺

@sideshow_boz
140 Followers
361 Following
343 Posts
🍁 Vancouver, BC (usually)
💻 #swiftlang #iosdev #swiftui
⚔️ Flailing #fencing foilist, at times
☕️ #coffee nerd alert
👌 粵語/日本語
🫶 Excellent. - C.M. Burns
Personal Webhttps://boscoho.ca
GitHubhttps://github.com/boscojwho
Chinotto for Mac (Xcode tool)https://github.com/boscojwho/Chinotto
Mlem 😛 (OSS contributor)@[email protected]
Dynamic Island on a Mac? 🤭 Talk about “complications” 😆
#macos #mac #swiftui #BuildInPublic

Anyone using SwiftUI’s LazyVGrid + .alert modifier on macOS hit this bug(?):
- Apply .alert modifier on items inside ForEach
- When alert is presented, the alert gets the wrong data value.
- This happens even when using the .alert(…presenting:) API

Workaround is to move alert outside of grid’s content builder, and save the data value to be presented in an [@]State var…

(See link for demo app with possible bug)
https://github.com/boscojwho/LazyGridBugExample

#swiftui #macOS #xcode

GitHub - boscojwho/LazyGridBugExample: Demo bug where alert on LazyVGrid item doesn't capture the correct data value using various APIs, and shows workaround.

Demo bug where alert on LazyVGrid item doesn't capture the correct data value using various APIs, and shows workaround. - boscojwho/LazyGridBugExample

GitHub

Made a little GUI app called “PipPy, a Python Pip package browser on macOS =)
- You can view system Pip packages and project (venv) Pip packages.
- Also includes a nice “Newest Packages/Latest Updates” feed from PyPI to stay up-to-date!
https://github.com/boscojwho/PipPy

Why? This project started because I found it hard to visualize all the Pip/venv installations in Python projects 😂

#SwiftUI #swift #macOS #python #BuildInPublic

GitHub - boscojwho/PipPy: A GUI app for Python Pip package manager on macOS.

A GUI app for Python Pip package manager on macOS. - boscojwho/PipPy

GitHub

Hacked together a simple climate data visualizer to confirm/deny my impression that the first half of this summer in Vancouver was less hot than recent years…turns out 2nd half of May 2024 was one of the coolest years in Vancouver Harbour in the past 30 years, weird!

Check out https://github.com/boscojwho/ClimateData to see your local Canadian weather station, if you’re technically inclined =)

#climate #climatechange #climatescience #swiftui #macos

GitHub - boscojwho/ClimateData: Visualize climate data from weather stations in Canada using data provided by ClimateData.

Visualize climate data from weather stations in Canada using data provided by ClimateData. - boscojwho/ClimateData

GitHub

This might be useful if you’re using Reflex framework to write web apps, and need to easily self-host for whatever reason
https://www.boscoho.ca/coding/blog/2024-07-09-reflex-self-host-vercel.md

#python #reflex #Vercel

Blog Post

Messing around with embossing/debossing SFSymbols in SwiftUI 😂
#swiftui #swift #ios

Interesting #SwiftUI example that demonstrates how to make an async func wait on a response to some UI. Because UI is state driven, it stores a continuation in a State that the async func can wait on.

https://developer.apple.com/documentation/SwiftUI/NewDocumentButton

NewDocumentButton | Apple Developer Documentation

A button that creates and opens new documents.

Apple Developer Documentation

Is there a way to disable the bounce on a sheet with detents presentation? None of the modifiers seem to do the trick. In UIKit, isModalInPresentation and disabling the view's gesture makes the sheet entirely static. This view is presented in a hosting controller so I'd have access to UIKit if that helps. A workaround seems to be to set a high-priority drag gesture onto the view but that makes my custom control not work any more.

#SwiftUI

New in iOS 18, etc.: `Text.textVariant(.sizeDependent)` view modifier, read about it here - http://urls.boscoho.ca/0ObIYH

Stumbled upon this cute new SwiftUI API (not sure which session this was discussed in), makes displaying formatted text in various view sizes much easier =)

#swiftui #swift #wwdc24

played Dixit for the first time, I’m definitely not the green rabbit 🤣 also reminds me of Mysterium
#boardgames