alibaba / wax

Wax is a framework that lets you write native iPhone apps in Lua.
http://github.com/probablycorey/wax
MIT License
1.84k stars 280 forks source link

write with argument list #38

Closed passol1988 closed 8 years ago

passol1988 commented 8 years ago
local alert = UIAlertView:initWithTitle_message_delegate_cancelButtonTitle_otherButtonTitles("title", "message", nil, "cancel", "continue", nil)

otherButtonTitles can take multiple arguments, how can I pass the parameters?

intheway commented 8 years ago

variable method can't be called dynamically. you can use like this:

local alert = UIAlertView:init();
alert:setTitle(title);
alert:setMessage("aaaa");
alert:setTitle("bbbb");
alert:setDelegate(self);
alert:addButtonWithTitle("cancel");
alert:addButtonWithTitle("ok");
alert:setTag(20147701);
alert:show();