load image using data from tableview
Hello,
I'm loading a list of results into a tableview. When the user clicks a row, I want to open an imageview to show the full image in horizontal mode. I see examples to create image views directly from the list, but that's not what I want. I have no problem showing the list of rows in the table view. But the problem is, how do I, onclick, trigger a function to call an xhr(to get the image from the web?) and show it full sscreen horizontally
1 Answer
-
As locking orientation may be perceived as hindering user choice, would there not be a chance that apple will reject your app? It would be interesting to hear other Ti devs' experience of this, and whether it is an issue.
Unfortunately there isn't a single example in the KitchenSink that demonstrates restricting the orientation. However, it is done like this:
var win = Titanium.UI.currentWindow; win.orientationModes = [ Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT ];
That said, I would tend to set orientationModes at window creation, if possible.
See this example to display a remote image.