Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

add top corner radius swift

extension UIView {
   func roundCorners(corners: UIRectCorner, radius: CGFloat) {
        let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
        let mask = CAShapeLayer()
        mask.path = path.cgPath
        layer.mask = mask
    }
}
Comment

how to add corner in swiftui

extension UIView {
   func roundCorners(corners: UIRectCorner, radius: CGFloat) {
        let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
        let mask = CAShapeLayer()
        mask.path = path.cgPath
        layer.mask = mask
    }
}
Comment

PREVIOUS NEXT
Code Example
Swift :: swift ways to setup constraints 
Swift :: swiftui full screen sheet 
Swift :: using swipe gesture recognizer swift 
Swift :: swiftui rectangle color 
Swift :: post request in swift 
Swift :: Make a VStack fill the width of the screen in SwiftUI 
Swift :: how to call app delegate function in swift 
Swift :: swiftui scrollview 
Swift :: sort array alphabetically swift 4 
Swift :: get address from latitude and longitude in swift 
Swift :: NumberFormatter swift 
Swift :: swift add programmatically width height constraint to view 
Swift :: get height of navigation bar swift 
Swift :: how to remove item from list swift 
Swift :: load image from url in Image swiftui (iOS 15) 
Swift :: swift convert string to int 
Swift :: swiftlint 
Swift :: guard let swift 
Swift :: swift check if array values are equal 
Swift :: how to add corner in swiftui 
Swift :: uikit call swiftui view 
Swift :: Swift Named Tuples 
Swift :: Swift Remove an Element from a Set 
Swift :: Swift Weak Reference 
Swift :: Swift Assigning and accessing a value from an optional 
Swift :: swift reading binary data 
Swift :: func collectionview 
Swift :: Swift if...else 
Swift :: swift optionals 
Swift :: Swift Literals 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =