0

I am trying to use a native UIPopOverController in my App. I am writing the code in Lua. I am planning to use Wax to integrate Objective-C and Lua. However, I don't know how to do this.

I'd like the popover to have a Header and then a list of options, sort of like the photo below.

sample popover

How to integrate UIPopOver in my Application using Lua ?

Bhavin
  • 27,155
  • 11
  • 55
  • 94
Matthew Mellea
  • 89
  • 1
  • 10

1 Answers1

1

I don't have wast experience with Lua, but I searched and find that you can Create and Assign popover to some View like this :

local popover=UIPopoverController:initWithContentViewController(viewController)
popover:setDelegate(self)
self.popover=popover

To assign ContentSize , you can use this kind of code :

popover:setPopoverContentSize_animated(CGSize(bounds.width, bounds.height), false)  

You can presentPopoverFromRect using this line :

popover:presentPopoverFromRect_inView_permittedArrowDirections_animated(rootView:frame(), rootView, 0, true)

For your Requirement you have to just Add Label and TableView to this PopOver. For more details , you can always take a look at IosImagePicker.lua.

Bhavin
  • 27,155
  • 11
  • 55
  • 94