Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6148521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:17:46+00:00 2026-05-23T19:17:46+00:00

UIImage has a method called ‘stretchableImageWithLeftCapWidth’ which scales an image horizontally without scaling the

  • 0

UIImage has a method called ‘stretchableImageWithLeftCapWidth’ which scales an image horizontally without scaling the ‘caps’.

Is there a way to do this vertically as well? Or even horizontal and vertically?

The SDK doesn’t show me any method which might do this. Google doesn’t give any help either, but maybe I’m searching for the wrong words.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:17:46+00:00Added an answer on May 23, 2026 at 7:17 pm

    The actual method is

    - (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight
    

    and it supports stretching (not scaling, the two are different concepts) in any direction.

    If you want to stretch only vertically then set the leftCapWidth to zero, to stretch only horizontally then set the topCapHeight to zero. And to stretch in both directions set both appropriately.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom UIView called TiledImage which has a single property named tiledImage
I have a UIViewController subclass called TripViewController. This class has the following method: -
I have a path problem with UIImage.FromFile() method. My solution folder has 3 projects
I have an odd problem. I am using an AQGridView which has a method
Root view is a UIImage View, it has subviews, those have subviews. My root
I have a UIImage containing an image with a whole bunch of smaller pictures
According to the UIImage documentation : In low-memory situations, image data may be purged
I have a UIImage. I have an EAGLView in my app, which is a
Android has a nice way of defining stretchable images called a nine-patch. See these
I have a scroll-view with a UIImage on top the UIImage has its own

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.