Post not yet marked as solved
Post marked as unsolved with 3 replies, 792 views
I am using following code to create contextual menus@available(iOS 13.0, *) extension FlightResultSingleJourneyVC : UIContextMenuInteractionDelegate {
func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationForMenuAtLocation location: CGPoint) -> UIContextMenuConfiguration? {
return UIContextMenuConfiguration(identifier: nil, previewProvider: nil) { suggestedActions in
return self.makeDefaultDemoMenu()
}
}
@available(iOS 13.0, *) func makeDefaultDemoMenu() -> UIMenu {
// Create a UIAction for sharing
let addToTrip = UIAction(title: "Add to Trip", image: UIImage(systemName: "plus.circle")) { action in
}
// Create an action for renaming
let share = UIAction(title: "Share", image: UIImage(systemName: "square.and.arrow.up")) { action in
// Show system share sheet
}
// Here we specify the "destructive" attribute to show that it’s destructive in nature
let pinFlight = UIAction(title: "Pin Flight", image: UIImage(systemName: "pin.circle")) { action in
// Perform pin/ bookmark operation
}
// Create and return a UIMenu with all of the actions as children
return UIMenu(title: "", children: [addToTrip, share, pinFlight])
}
}However, the titles are getting truncated when I run the code on the simulator as well as on the physical device.Please refer to the following URL for the actual result. Please suggest corrective action to fix ithttps://ibb.co/NCwb1fH