Blog
RSSNotes from building and running things, by Yein Yi.
BombLab Phase5 Walkthrough
Walks through phase_5 of BombLab: a 6-character input whose low 4 bits index an array that must sum to 58.
BombLab Phase4 Walkthrough
Analyzing the phase_4 and func4 assembly in BombLab to find the answer 7 7.
BombLab Phase3 Walkthrough
Analyzing phase_3's jump table to find the two-number answers
BombLab Phase2 Walkthrough
Analyzing the read_six_numbers and phase_2 assembly to find the six-number answer
BombLab Phase1 Walkthrough
Analyzing the string_length, strings_not_equal, and phase_1 assembly to find the answer
Fitting a UIImageView to its image size
How to remove leftover padding by computing a UIImageView's height from the image ratio
Passing Data from a Child View to a Parent View (PreferenceKey, GeometryReader)
Get a child view's size with GeometryReader and pass it up to the parent view with PreferenceKey.
UICollectionViewHeader with Dynamic Height
Use systemLayoutSizeFitting to calculate the height from the subview constraints and set the collection view header height dynamically.
Fixing the withAnimation Bug
Fixed the problem where withAnimation in onAppear also moves an unrelated view, by using the animation modifier.
ForEach's ID
What ForEach's id does, and how to wrap values in Identifiable when they overlap.
keyPath as a function
Since Swift 5.2 you can pass a keyPath like a function, which makes map and filter shorter.
Fitting a UIImageView to the Image size
Remove the extra margin in a scaleAspectFit image view by setting a height constraint from the image's aspect ratio.
Calling a completionHandler after multiple async calls
To call several async functions and handle the result once after all of them finish, use DispatchGroup's enter, leave and notify.
Cell event error
When a view put in a cell doesn't respond to taps: the problem caused by contentView, and how to fix it.
addGestureRecognizer vs addTarget
The difference between addGestureRecognizer, used on UIView, and addTarget, used on UIControl.









