I have created iOS module in Titanium. This module includes my own framework written in native objective c. Everything looks fine, but there is one issue. One of the methods i’ve ported from my framework through module, takes a UIView and adds to it another uiview as a subview.
This subview contains a UIView with a UIButton. Problem is that sometimes subview appeares on the screen but without label on the button, i have to click the button, then the label appeares. But in some situations (it depends when i call this method from the module in javascript), subview doesn’t appeare at all, but it is actually there because when i tap on the place where it should be, button’s click event handler is being called.
I have no idea what is wrong (maybe something with layer).
When i use my framework in a native ios app, everything is working fine.
Could someone help me with that?
Subview has to be added on main thread, so i have used a method:
Now everything appeares perfectly.