FUICreateGeometryPopOverTableViewController

open class FUICreateGeometryPopOverTableViewController : FUIResizablePopoverContainer, UITableViewDelegate, UITableViewDataSource

A view controller showing popover list for creating geometry in map view.

Usage

Initialize the popover content view controller.

var popoverContent = FUICreateGeometryPopOverTableViewController()

Define selection behavior and do some setup for map legend items.

@objc private func presentCreatePopover() {
   popoverContent.items = createGeometryItems
   popoverContent.modalPresentationStyle = .popover
   let popover = popoverContent.popoverPresentationController
   let createGeometryResultsController = CreateGeometryResultsController()
   popoverContent.didSelectHandler = { [unowned self] createItem in
       createGeometryResultsController.editingGeometryMapLegendItem = createItem
       self.navigationController?.pushViewController(createGeometryResultsController, animated: true)
   }
   popover?.barButtonItem = plusBarButtonItem
   self.present(popoverContent, animated: true, completion: nil)
}
  • Define closure function allowing post processing after map legend item is selected

    Declaration

    Swift

    open var didSelectHandler: ((FUIMapLegendItem) -> ())?