     var barButton : UIBarButtonItem? = nil
     //var contactPickerMode : EVContactModeOption! = .Internal
     var useExternal : Bool = false
+    public var maxSelectedContacts : Int = -1 {
+        didSet {
+            singleSelection = maxSelectedContacts == 1;
+        }
+    }
+    var singleSelection : Bool = false {
+        didSet {
+            updateTitle()
+        }
+    }
     var externalDataSource : [EVContact]? = nil
     
     public var delegate : EVContactsPickerDelegate?

            self.barButton?.enabled = false
        }
        
        self.title = String(NSBundle.evLocalizedStringForKey("Add Contacts") + "(\(self.selectedContacts!.count))")
        self.filteredContacts = self.contacts
        self.tableView?.reloadData()
        
        return indexPath
    }
    
    // MARK: - EVPickedContactsViewDelegate

    }
    
    func setup() -> Void {
        updateTitle()
        self.curBundle = NSBundle(forClass: self.dynamicType)
        if( self.useExternal == false ) {
            self.store = CNContactStore()
        }

    }
    
    func updateTitle() -> Void {
        var contactsPresented = false
        if let theContacts = self.selectedContacts {
            contactsPresented = theContacts.isEmpty
        }
        if contactsPresented == false {
            if singleSelection {
                self.title  = NSBundle.evLocalizedStringForKey("Selected Contacts")
            } else {
                self.title  = NSBundle.evLocalizedStringForKey("Selected Contacts") + "(0)"
            }
        } else {
            if singleSelection {
                self.title  = NSBundle.evLocalizedStringForKey("Add Contacts")
            } else {
                self.title = String(NSBundle.evLocalizedStringForKey("Add Contacts") + "(\(self.selectedContacts!.count))")
            }
        }
    }

    override public func viewDidLoad() {
