How is the ui problem is usually tackled with haxe? I tried googling a bit, but didn't come up with a conclusive answer.
How is the ui problem is usually tackled with haxe? I tried googling a bit, but didn't come up with a conclusive answer.
Many of the companies using Haxe are game studios, and so they just invent their own UI and it doesn't matter if it doesn't feel "native".
In terms of the two approaches you mentioned: both can be used. There are various projects to "reinvent" a basic UI toolkit that works on NME, the cross platform graphics layer. These libraries would do what you mentioned first - have a consistent experience across platforms, but one that is foreign and probably not as polished. No libraries have really gained a huge amount of support for this yet, though it seems there are a few trying.
The other approach - integrating with native UI - is also possible using Externs, which link in with an underlying system. I'm not sure how much use this has had. Some iOS features have externs, and on the desktop wxWidgets externs are around so this approach is possible. If you were to do this I guess you'd try to abstract away as many differences as you can, so that you need as little conditional compilation as possible. Not sure who is trying this at the moment.
As I said though, UI toolkits is definitely not a strong point. My main development with Haxe is for JS / HTML, so I just use standard bootstrap / jQuery elements, which feel "web native" I suppose.
The new java target and already available JNI usage targets Android.
There is also http://lib.haxe.org/p/hxffi and a established way to call iOs framework code with hxcpp, which is through the CFFI . You should probably have a read (mostly for Cauê Waneck's posts): https://groups.google.com/forum/#!topic/haxelang/9_FHI5cDue0