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

  • SEARCH
  • Home
  • 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 820403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:28:04+00:00 2026-05-15T02:28:04+00:00

Android has a nice way of defining stretchable images called a nine-patch. See these

  • 0

Android has a nice way of defining stretchable images called a nine-patch. See these docs for a description of the concept. The idea is to surround a png image with a 1-pixel border where you can define the stretchable areas and the padding dimensions of the image. This is absolutely brilliant and I’d like to use the idea in my iPhone app. Before writing my own nine-patch to UIImage loader I thought I’d see if one already exists. Google doesn’t return any results so I don’t have much hope, but it doesn’t hurt to ask, right? 🙂

EDIT: Folks, I appreciate the answers but I know about stretchableImageWithLeftCapWidth.... I’m looking for code that takes a path @"foo.9.png" and returns a stretchable UIImage. This code will undoubtedly use stretchableImageWithLeftCapWidth... internally. I’m sure I could write the code myself using that method. But I’m asking if somebody else has already done it.

  • 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-15T02:28:05+00:00Added an answer on May 15, 2026 at 2:28 am

    I received an e-mail from Tortuga22 software who informed me that they have created such a library and released it under the Apache license:

    Announcement: http://blog.tortuga22.com/2010/05/31/announcing-tortuga-22-ninepatch/

    Source code: http://github.com/tortuga22/Tortuga22-NinePatch

    Example usage:

    // loads-and-caches ninepatch and rendered image of requested size
    UIImage buttonImg = [TUNinePatchCache imageOfSize:buttonSize 
                                    forNinePatchNamed:@"buttonNormalBackground"];
    [self.buttonNeedingBackground setImage:buttonImg
                           forControlState:UIControlStateNormal];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Twitter application for Android has a nice way of refreshing the listview by
The Android Music app has a nice implementation of the ViewPager . When sliding
My Android Application has only one activity called MainActivity . When I press the
Android has a way to set the home screen wallpaper. The user taps menu
Since Android 4 has some nice new APIs, and since Android is Open Source,
Sipdroid on Android has a search & replace method, that uses regex. I'm trying
R class on android has it's limitations. You can't use the resources dynamically for
I know that Android has a JSON parser baked in but I was wondering
It seems that android has enforced that a listview must have the name android:id=@android:id/list,
Android System has a builtin certificate Store. The certificates from this store are for

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.