Skip to content

adlerkismet/AKImageCenterStrech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AKImageCenterStrech

  • An easy way to strech image centosymmetric.

Contents

  • How to install:
    • Drag All files in the AKImageCenterStrech folder to project
    • Import the main file:#import "UIImage+RelativeCenterStretch.h"
  • How to use:
//horizon strech:
UIImage *horizonStrechImage = 
[originImage stretchWithFinalWidth:240 leftCapInset:40 leftStretchSpacing:2 rightCapInset:40 rightStretchSpacing:2];
//Vertical strech:
UIImage *verticalStrechImage = [originImage stretchWithFinalHeight:240 topCapInset:40 topStretchSpacing:2 bottomCapInset:40 bottomStretchSpacing:2];
//center Strech:
UIImage *horizonStrechedImage = [originImage stretchWithFinalWidth:240 leftCapInset:40 leftStretchSpacing:2 rightCapInset:40 rightStretchSpacing:2];
UIImage *centerStrechImage = [horizonStrechedImage stretchWithFinalHeight:240 topCapInset:40 topStretchSpacing:2 bottomCapInset:40 bottomStretchSpacing:2];
  • orgin image:

AKImageCenterStrech-tenArrow.png

  • strech image:

AKImageCenterStrech-demo.png

  • How to completion:

AKImageCenterStrech-一行代码中心对称拉伸图片

About

An easy way to strech image centrosymmetric.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published