-1

This is what I have now:

enter image description here

but I would prefer sth like this:

enter image description here

When I tap on the option I push a new UIViewController onto the stack:

This is how my configurationItems() method looks like:

override func configurationItems() -> [AnyObject]! {

    let composeSheet = SLComposeSheetConfigurationItem()
    composeSheet.title = "firstItem"
    composeSheet.value = "defaultValue"

    let composeSecondSheet = SLComposeSheetConfigurationItem()
    composeSecondSheet.title = "secondItem"

    return [composeSheet, composeSecondSheet]
}
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358

1 Answers1

1

This is what it needs to be done:

let composeSheet = SLComposeSheetConfigurationItem()
composeSheet.title = "firstItem"
composeSheet.value = "defaultValue"
composeSheet.tapHandler = {
    self.pushConfigurationViewController(UIViewController())
}

Once tap handler is assigned it automatically creates the right arrow:

enter image description here

When you press that composeSheet you push controller onto navigation stack:

enter image description here

Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
  • What if I want to present a full view controller after firstitem clicked.same like dropbox is doing with SAVE TO optiont. I tried "controller.modalPresentationStyle = .overCurrentContext" but not succeed. – Princess Jul 22 '20 at 15:45