1

I am using cosmicmind Material Swift and am trying to insert contact chips into a text field. I am using the native ContactsUI picker presented modally for a user to select the contacts to send a message to. I am retrieving their display name and storing it as the title for the ChipIconButton:

open func prepareChipIconButton(contactDisplayName:string)  {
    let icon = UIImage.profile! //added an extension to UIImage to user Material person icon for this
    let button = ChipIconButton(image:icon, title: contactDisplayName)
    peopleToSendMessageToTextField.text!.appending(button)//ERROR
}

The error is obviously: Cannot convert value of type 'ChipIconButton' to expected argument type 'String'

I have to append rather than set equals to of course because if a user selects multiple contacts. Either way this will not allow me to insert a ChipIconButton which inherits from Button.

The desired appearance is to ultimately look like this: enter image description here

kinghenry14
  • 1,187
  • 1
  • 11
  • 34
  • Hey, I am working on Chips within the framework, if you would like to make this an issue, we can work on this and make a release for a new feature. Thank you! – CosmicMind Aug 23 '17 at 16:18

0 Answers0