If a parent view exists and a button is placed within a child view, there can be various reasons why the button does not receive touch events. In such cases, check the following items in order:
button.isEnabled = true
bringSubviewToFront
or adjust layer.zPosition
to modify its position.// Bring the button to the front
view.bringSubviewToFront(button)
// Increase the button's zIndex
button.layer.zPosition = 10
point
parameter is provided in the view’s coordinate system, and it returns the frontmost (lowest-level) view.hitTest
is functioning correctly.override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
let view = super.hitTest(point, with: event)
print(view ?? "nil")
return view
}
isUserInteractionEnabled = false
, touch events will not be delivered.button.isUserInteractionEnabled = true
superview.isUserInteractionEnabled = true
// Touch events are not delivered if alpha is less than 0.01
button.alpha = 1.0
// If the parent view has clipsToBounds = true, touches may be clipped
superview.clipsToBounds = false
// If another view's gesture is intercepting touch events
let gesture = UITapGestureRecognizer(target: self, action: #selector(handleTap))
gesture.cancelsTouchesInView = false
view.addGestureRecognizer(gesture)
button.isExclusiveTouch = true
Variable fonts are an advancement in the OpenType font specification, developed through collaboration among Adobe, Apple, Google, and Microsoft. Instead of using separate files for different widths, weights, and styles, a single file can contain multiple variations of a font.
Variable fonts feature various axes such as width, weight, and slant. These axes can be adjusted numerically to create and combine different styles.
Compared to static fonts, variable fonts allow for greater flexibility in defining styles using just one file.
Font extensions: .otf, .ttf
A simple distinction:
.ttf
(TrueType Font) uses a 2D Bézier curve system to render shapes..otf
(OpenType Font) uses a 3D Bézier curve system, resulting in smoother curves, but may appear distorted on low-resolution screens or certain programs.On Android, there are various Fake GPS apps available on the Play Store that allow users to freely modify their device’s location. However, on iOS, there are no such apps available for real devices, aside from simulator settings.
That said, an open-source macOS app called LocationSimulator can be used to modify location settings on iOS devices running versions prior to iOS 17. Since I currently don’t have an iOS 17 or older device, I tested it on a simulator, and it seemed more convenient than manually changing the simulator’s location.
iOS Version Downgrade
iPSW provides a simple way to downgrade to signed iOS versions. However, downgrading via other methods is complex and may cause device issues.
logAlign
and logoMargin
, but you should also consider the contentInset
property.
tag or web view links with a predefined deep link scheme to navigate to a specific screen within the app. If you use OneLink, it redirects externally before navigating to the desired screen.