Scaling and stretching of uiimage images developed by iPhone

Source: Internet
Author: User

Sometimes, to reduce the size of the app package, we can use a tiled image to provide only a part of the image and then use code to stretch it.

The system has functions to solve image scaling and stretching problems:

-(Uiimage*) Stretchableimagewithleftcapwidth :(Nsinteger) Leftcapwidth topcapheight :(Nsinteger) Topcapheight;

The leftcapwidth and topcapheight parameters refer to the starting coordinates that do not want to be stretched.

An image of 80*80, if leftcapwidth is 20, topcapheight is 40

The image is scaled at the starting point of (20, 40 ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.