• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to Stop an Image scaling in an Image View?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Stop an Image scaling in an Image View?


  • Subject: Re: How to Stop an Image scaling in an Image View?
  • From: David Duncan <email@hidden>
  • Date: Wed, 05 Jul 2017 09:34:55 -0700


> On Jul 5, 2017, at 7:54 AM, Dave <email@hidden> wrote:
>
> Hi,
>
> In XCode/IB, if add an Image View that has the Image property to an image in
> my project it shows the image scaled to fit the Frame of the Image View. How
> can I stop this and just truncate it? I want two images on top of each other
> and just show the top half of one and the bottom half of the other.
>
> I see loads of scaling options in the “Content Mode” Property, but nothing to
> say “none”. The closest I’ve managed so far is to set the Content Mode to
> “Aspect Fit” and also set the clip to bounds. This does what I want BUT the
> centre of the image shows, not the top, left.

The content modes in the list should be complete – you don’t want ‘none’ as
that doesn’t describe how to place over or undersized images. You probably want
to use one of the Top & Bottom variants for your top & bottom image views
respectively.

>
> Basically, I have two 24 x 24 images placed one on top of the other, I want
> to show the first half (e.g. 0,0,24,12) of ImageA and the bottom half of
> imageB (e.g. 0,12,24,12).
>
> Can I do this in XCode/IB? If not can I do this in code?
>
> Cheers
> Dave
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

--
David Duncan

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to Stop an Image scaling in an Image View? (From: Dave <email@hidden>)

  • Prev by Date: How to Stop an Image scaling in an Image View?
  • Next by Date: Re: How to Stop an Image scaling in an Image View?
  • Previous by thread: How to Stop an Image scaling in an Image View?
  • Next by thread: Re: How to Stop an Image scaling in an Image View?
  • Index(es):
    • Date
    • Thread