         
         func nb_setNeedsDisplayInRect(rect: CGRect) {
             self.nb_mainThreadCheck()
-            self.nb_setNeedsDisplayInRect(rect)
+            self.nb_setNeedsDisplayInRect(rect: rect)
         }
     }
     

        private func nb_mainThreadCheck() {
            // iOS 8 layouts the MFMailComposeController in a background thread on an UIKit queue.
            // https://github.com/PSPDFKit/PSPDFKit/issues/1423
            if !NSThread.isMainThread() && String.fromCString(dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL))?.hasPrefix("UIKit") != true {
                let stack = NSThread.callStackSymbols().joinWithSeparator("\n")
                assert(false, "\nERROR: All calls to UIKit need to happen on the main thread. You have a bug in your code. Use dispatch_async(dispatch_get_main_queue()) { } if you're unsure what thread you're in.\n\nBreak on nb_mainThreadCheck to find out where.\n\nStacktrace:\n\(stack)")
            }
        }

                for method in ["setNeedsLayout", "setNeedsDisplay", "setNeedsDisplayInRect"] {
                    swizzle(self, Selector(method), Selector("nb_\(method)"))
                }
            })
        }
        
        // MARK: - Method Swizzling
