I have images of same width but various heights that I'd like to place vertically centered in the carousel.
The current settings are:
// For the carousel
myCarousel.resizeType = .WithoutResizing(1.0)
// For each image in the carousel
myImgView.contentMode = UIViewContentMode.ScaleAspectFit
myImgView.frame = CGRectMake (0, /* x-offset */
0, /* y-offset */
width, scaledHeight)
The issue is setting the y-offset to a non-zero would freeze the carousel to scroll.
I tried changing the image content mode to myImageView.contentMode = UIViewContentMode.Center, but the images would not scale correctly.
Hey @dulimarta. Sorry for getting so late back to you. This is a bug because as of now there are few places where the y property is not really coded as it should. I will take a look at it in the next few days!
I have images of same width but various heights that I'd like to place vertically centered in the carousel. The current settings are:
The issue is setting the y-offset to a non-zero would freeze the carousel to scroll.
I tried changing the image content mode to
myImageView.contentMode = UIViewContentMode.Center
, but the images would not scale correctly.