Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Photo height and width rendering issues on IOS

$
0
0
I have an app that displays 6 photos per page from my website. I can't figure out a way to displays all of the photos correctly. Usually one or more photo is not sized properly, it's the correct width but its bottom has been cropped. My guess is that appcelerator is doing it's table row size calcs before the photos load. What I do it set the the width of the image view to be the width of the device and don't set the height. I've had to add a click event so my user can click to rescale the photo just incase it did not render correctly. Here's some of my code that shows how I'm setting up the image view. Any suggestions on a better way to solve this issues would be appreciated. --- var width = Ti.Platform.displayCaps.platformWidth - 0; var casheBuster = new Date(); var photoUrl = blog.PhotoUrl + '?casheBuster='+ casheBuster.getTime(); var blogPhoto = Ti.UI.createImageView({ image: photoUrl , left : 0, width : width, borderWidth: 8, borderColor: "white" }); blogPhoto.addEventListener('click', function(e) { var blob = e.source.toImage(); e.source.width = blob.width; }); vv = UIBase.createVerticalView(); vv.width = width; vv.add(blogPhoto); row.add(vv); ---

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>