I would like to provide two different methods in one identical area:
append(UIButton, :function1).on(:touch) do |sender|
function1
and
append(UIButton, :function2).on(:touch_down_repeat) do |sender|
function2
Placing the methods function1 and function2 in the stylesheet in the same area, only function2 will be working while function1 is in the layer below, covered.
Is there any solution to the problem?
I image something like this:
append(UIButton, :function1).on(:touch) do |sender|
function1
and
append(UIButton, :function2).on(:touch_down_repeat) do |sender|
function2
end
@hboon,
sorry, I had not been clear:
Of course the two methods (function1 and function2) are being placed in the screen class.
They work fine as long as they are not placed at the same area. But this is what I need.
In my app the user is supposed to evaluate a certain area on the display:
Tapping it once it should create effect #1, while tapping it twice it should create effect #2.