     }
     
     private func setObservers() {
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: "deviceOrientationDidChange:", name: UIDeviceOrientationDidChangeNotification, object: nil)
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(KCSelectionDialog.deviceOrientationDidChange(_:)), name: UIDeviceOrientationDidChangeNotification, object: nil)
     }
     
     private func createDialogView() -> UIView {

    private func createCloseButton() -> UIButton {
        let button = UIButton(frame: CGRectMake(0, titleHeight + CGFloat(items.count*50), 300, buttonHeight))
        
        button.addTarget(self, action: "close", forControlEvents: UIControlEvents.TouchUpInside)
        
        let colorNormal = closeButtonColor != nil ? closeButtonColor : button.tintColor
        let colorHighlighted = closeButtonColorHighlighted != nil ? closeButtonColorHighlighted : colorNormal?.colorWithAlphaComponent(0.5)

            itemTitleLabel.font = item.font
            itemButton.addSubview(itemTitleLabel)
            itemButton.setBackgroundImage(UIImage.createImageWithColor(UIColor(red: 0.9, green: 0.9, blue: 0.9, alpha: 1)), forState: .Highlighted)
            itemButton.addTarget(item, action: #selector(KCSelectionDialogItem.handlerTap), forControlEvents: .TouchUpInside)
            
            if item.icon != nil {
                itemTitleLabel.frame.origin.x = 34 + itemPadding*2
