-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
Hello! Thanks again for sharing this!
I'm trying to present a view controller with a Popover style when the user touches the DetailButton inside a cell.
The thing is i haven't found yet a solution to get the sourceRect or the accessoryView itself.
accessory: .DetailButton({ [unowned self] in
let detailButton = // Thats what i need
let vc = UIViewController()
vc.modalPresentationStyle = .Popover
vc.preferredContentSize = CGSize(width: 100, height: 200)
vc.popoverPresentationController?.sourceView = detailButton
vc.popoverPresentationController?.sourceRect = detailButton.bounds
vc.popoverPresentationController?.permittedArrowDirections = .Any
vc.popoverPresentationController?.delegate = self
self.presentViewController(vc, animated: true, completion: nil)
})Anyone have a solution to this since we don't have any arguments in the Selection closure?
Thanks! 👍👍👍
Metadata
Metadata
Assignees
Labels
No labels