Questions tagged [uiviewcontentmode]

A flag used to determine how a view lays out its content when its bounds change.

A flag used to determine how a view lays out its content when its bounds change.

For more detail read UIView Class Reference

20 questions
0
votes
1 answer

How to set contentMode of button's backgroundImagView as UIViewContentModeScaleToFill?

I know how to set contentmode of button's imageview to aspect to fit, but I'm using button's backgroundImage. How to access and set it as I want?
user2649058
0
votes
1 answer

UIImageView with contentMode AspectFit break Autolayout height in iOS7 but working properly in iOS8

According to my previous question. Autolayout for Height working in iOS8 but not working in iOS7 I use UIImageView which will display the image from server once the download finished. I have autolayout constraint to define the height of…
Kong Hantrakool
  • 1,865
  • 3
  • 20
  • 35
0
votes
0 answers

Maintain image quality in iOS Application

I am trying to create a photo application but I am having a tough time formatting my photos so that they show clearly. I have an imageview size 320 * 500, and an image size 3648*2736 px (Which of course I can scale down). …
Niana
  • 1,057
  • 2
  • 14
  • 42
0
votes
1 answer

Custom UIView drawRect is called even with UIViewContentModeScaleAspectFill

I'm having the following issue. Suppose I have my own image view class (to make it easy I've trimmed all the code and just included only the code that is causing the issue). That class inherits from UIView and overrides drawRect. Here is how my…
kyurkchyan
  • 2,260
  • 2
  • 23
  • 37
0
votes
1 answer

Change how UIViewContentModeScaleAspectFill works

At the moment this setting (on a UIImageView for instance) will keep the centre of the UIImage in the centre of the UIImageView and "crop" the edges that exceed the bounds equally on both sides. Is there a way to change this at all? For instance, if…
Fogmeister
  • 76,236
  • 42
  • 207
  • 306
1
2