Post

Replies

Boosts

Views

Activity

Reply to UISlider Unusual Track Behaviour
class CustomSlider: UISlider {     override func trackRect(forBounds bounds: CGRect) -> CGRect {         let point = CGPoint(x: bounds.minX, y: bounds.midY)         return CGRect(origin: point, size: CGSize(width: bounds.width, height: 20))     } }
Apr ’22
Reply to CollectionView not calling didSelectItemAt correctly
I was using this to hide the keyboard when tapped on screen (in the SwiftUI view), looks like the gesture recogniser for this was causing the issue. Once removed the collectionView works correctly. func hideKeyboardOnTap() -> some View { return self.onTapGesture { UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) } }
Feb ’24