                                             attribute: .top,
                                             multiplier: 1,
                                             constant: margin)
+        if let priority = priority {
+            constraint.priority = priority
+        }
+        
         superview.addConstraint(constraint)
         
         return constraint
     }
     
-    @discardableResult public func pinToSafeAreaRight(_ margin: CGFloat = 0) -> NSLayoutConstraint {
+    @discardableResult public func pinToSafeAreaRight(_ margin: CGFloat = 0, priority: UILayoutPriority? = nil) -> NSLayoutConstraint {
 
         guard let superview = superview else { fatalError() }
         

    
    // MARK: - Pin to safe area
    
    @discardableResult public func pinToSafeAreaTop(_ margin: CGFloat = 0) -> NSLayoutConstraint {

        guard let superview = superview else { fatalError() }
        

                                            attribute: .left,
                                            multiplier: 1,
                                            constant: margin)
        
        if let priority = priority {
            constraint.priority = priority
        }
        
        superview.addConstraint(constraint)
        
        return constraint
