Posts by ole@chaos.social
(DIR) Post #APTpSLdNRkB8NLbzDU by ole@chaos.social
2022-11-10T22:05:07Z
1 likes, 0 repeats
New article: Positioning the SwiftUI animation modifier in the view tree. The positioning of `.animation` with respect to other view modifiers generally matters, but this isn’t true for all modifiers. https://oleb.net/2022/animation-modifier-position/
(DIR) Post #APhO5qQApzIWeMv69Y by ole@chaos.social
2022-11-17T10:46:14Z
0 likes, 0 repeats
@jjoelson @thattridentdude @twostraws I can sort of make it work with ScrollViewReader (if this is what you mean), but only with `.navigationBarTitleDisplayMode(.inline)`. And the animation is ugly. https://gist.github.com/ole/ca325b65013bc6cdf4b8e168eabd0572
(DIR) Post #APhO5tB2ahyXCIrYTw by ole@chaos.social
2022-11-17T14:59:38Z
0 likes, 0 repeats
@jjoelson @thattridentdude @twostraws You can probably track this manually with `.onAppear`/`.onDisappear` on each row, but it’d be messy. Yeah, SwiftUI still doesn’t make it easy if you want to stray from the track.
(DIR) Post #APhPuj2Q9BysTUdSKm by ole@chaos.social
2022-11-17T15:30:10Z
1 likes, 0 repeats
@shadowfacts @thattridentdude @jjoelson @twostraws For List on iOS 16, onAppear/onDisappear fire as rows are scrolled in and out of the viewport. I tested this a about a month ago. Other container views may behave differently.
(DIR) Post #AQCuexHIWL9jPQ8okK by ole@chaos.social
2022-11-22T16:07:09Z
4 likes, 9 repeats
I recently learned that German company Telefunken arguably invented the computer mouse. They offered a “Rollkugelsteuerung” (“rolling ball control”) for one of their mainframes in 1968, months before Douglas Engelbart’s “mother of all demos”. Telefunken’s mouse was also more advanced than Engelbart’s mouse as it used a ball instead of two wheels. (Photo credit: Marcin Wichary, CC-BY 2.0, https://www.flickr.com/photos/8399025@N07/2322838281 and https://www.flickr.com/photos/mwichary/2322836557/)
(DIR) Post #AQNAy55lEaUzzcUCW0 by ole@chaos.social
2022-12-07T18:40:12Z
1 likes, 0 repeats
I wrote a little SwiftUI app to demonstrate how different container views (List, ScrollView, TabView, etc.) affect their child views’ lifetime, as well as lifecycle events like onAppear and onDisappear. Feedback welcome! https://github.com/ole/swiftui-view-lifecycle
(DIR) Post #AQdvo1p0LIutKTiQvQ by ole@chaos.social
2022-12-15T20:57:12Z
1 likes, 0 repeats
New article: Understanding SwiftUI view lifecycles https://oleb.net/2022/swiftui-view-lifecycle/
(DIR) Post #AQdwi08TnWJAJjVz2O by ole@chaos.social
2022-12-15T21:26:37Z
1 likes, 0 repeats
@shadowfacts Good question. .task (without passing an id) has the same semantics as .onAppear. The only difference is that .task may be called a few frames later because it executes its action async.
(DIR) Post #AQmF64MH6R9gnpGzhI by ole@chaos.social
2022-12-19T18:44:57Z
1 likes, 0 repeats
Looks like you can’t try out ChatGPT without giving OpenAI your phone number. I feel like we’re all failing the intelligence test by consenting to this.
(DIR) Post #ASGz8ZfVf0YvGpF9G4 by ole@chaos.social
2023-02-02T14:39:26Z
1 likes, 0 repeats
A love letter to os_unfair_lock from @Catfish_Man: https://cohost.org/Catfish-Man/post/913314-a-love-letter-to-os“4 bytes, unfair, super fast uncontended, efficient when contended, donates priority, enforces correct use via assertions.”
(DIR) Post #ASkkTqg84h3BfIuNo8 by ole@chaos.social
2023-02-16T22:30:51Z
1 likes, 0 repeats
Xcode 14.3: “print output now appears in the console for SwiftUI Previews by selecting “Preview” tab in the console.” Yay! https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes
(DIR) Post #AWPwPi816AI4kftbge by ole@chaos.social
2023-06-06T12:10:44Z
4 likes, 4 repeats
— You hang up!— No, you hang up!— You hang up!— No, you hang up!— Honey, I’m running the iOS 17 beta. I literally cannot hang up.
(DIR) Post #AuH8EtqLMABwkBUX68 by ole@chaos.social
2024-08-26T17:51:58Z
0 likes, 0 repeats
1. German crime reporter asks MS Copilot what it knows about him.2. Copilot falsely accuses him of child abuse, fraud, theft.3. Copilot asserts “it is unfortunate that someone with such a criminal past has a family” and provides his (correct!) address and phone number.4. Reporter files a libel complaint, but prosecutors refuse to take on the case: it’s not a criminal offense because no person committed it.Must be great to be a big tech company. https://www.swr.de/swraktuell/baden-wuerttemberg/tuebingen/ki-macht-tuebinger-journalist-zum-kinderschaender-100.html