Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
Free

Apache License, 2.0

The Apache License, 2.0 is an
open-source license.
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

(9 ratings)

iOS Button Image Generator

iOS Button Image Generator
Developed by Dillion Tan, Released Feb 25, 2012

Programmatic button image generation (with caching) and button title customization for iOS applications.

Objective-C

Tags: button image , cifilter , ios , line height

An UIButton enhancement for:

  • Programmatic generation of button images using Core Image filters
  • Caching the generated images in a Nimbus in-memory cache
  • Setting custom line spacing on button text using MTLabel
Back to top

Basic Usage

1) For generating filtered images -
a) To use Nimbus memory caching (ref. https://github.com/jverkoey/nimbus), add NIMEMCACHE=1 to Preprocessor Macros, Project Build Settings
b) Generate the filtered image using the UIButton category function

- (UIImage *)generateImageUsingNormalImage:(UIImage *)normalImage
         cacheName:(NSString *)cacheName
         filterType:(NSString *)kFilterType
         filterAttributes:(NSDictionary *)attributes

2) For adjusting line spacing of button text -
Use the button subclass DemoButton and set buttonLabel instead of titleLabel (ref. https://github.com/Tuszy/MTLabel)

Back to top

Demo project as a preview tool

Use the demo project as a tool to preview filter effects
1. Replace button images with your own
2. Adjust button frame size
3. Scroll the filter panel to select a filter
4. Lock the filter scroll and adjust sliders to set filter settings
5. Tap on button to view the generated image, or set flash switch to on (alternates between generated and normal image)

View all 6 reviews »

User Reviews

  • yeshenpeng 10 months ago
    easy to integrate, easy to use!
    Flag
    Was this helpful? Yes No
  • Narva Nio Adas 1 year ago
    It is very easy to use.
    Flag
    Was this helpful? Yes No
  • salma 1 year ago
    great component!
    with iosButton image generator i've saved time and it is so easy to use :)
    thanks a lot
    Flag
    Was this helpful? Yes No

Questions & Comments


Or enter your name and Email
No comments have been posted yet.
You must be logged-in to vote. Log-in to your account or register now.