Latest 0.0.6
Homepage https://github.com/jfuellert/JF3DTouchButton
License None
Platforms ios 9.0, requires ARC
Frameworks UIKit
Authors

JF3DTouchButton is a touch sensitive button built for 3D touch compatible devices. It provides additional state properties and transitional features to improve a user’s 3D touch experience.

alt tag

Purpose

The main purpose of this software is to provide developers with a simple way to add non-intrusive 3D touch button enhancements for applications.

Installation

Install via CocoaPods
Add the following line to your .podfile

pod 'JF3DTouchButton'

Support

IOS

Earliest tested and supported build and deployment target – iOS 9.0.
Latest tested and supported build and deployment target – iOS 9.1.

ARC Compatibility

JF3DTouchButton is built from ARC and is ARC-only compatible.

Usage

State usage follow a similar syntax to existing state structures for UIButton.

Setting a background color

Background color supports UIControlStateNormal, UIControlStateHighlighted, and UIControlStateSelected states. Use nil to remove a color for state.

        [touchButton setBackgroundColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
        [touchButton setBackgroundColor:[UIColor redColor] forState:UIControlStateHighlighted];

Setting a size

Size supports UIControlStateNormal, UIControlStateHighlighted, and UIControlStateSelected states. Use CGSizeNull to remove a size for state. A null value for a state will return the object’s current size.

        [touchButton setSize:CGSizeMake(110.0f, 80.0f) forState:UIControlStateNormal];
        [touchButton setSize:CGSizeMake(260.0f, 60.0f) forState:UIControlStateHighlighted];

Setting an image

Image setting supports UIControlStateNormal, UIControlStateHighlighted, and UIControlStateSelected states. Use nil to remove an image for state.

        [touchButton setImage:[UIImage imageNamed:@"placeholderNormal"] forState:UIControlStateNormal];
        [touchButton setImage:[UIImage imageNamed:@"placeholderHighlight"] forState:UIControlStateHighlighted];

Setting a background image

Background image setting supports UIControlStateNormal, UIControlStateHighlighted, and UIControlStateSelected states. Use nil to remove a background image for state.

        [touchButton setBackgroundImage:[UIImage imageNamed:@"placeholderNormal"] forState:UIControlStateNormal];
        [touchButton setBackgroundImage:[UIImage imageNamed:@"placeholderHighlight"] forState:UIControlStateHighlighted];

Latest podspec

{
    "name": "JF3DTouchButton",
    "version": "0.0.6",
    "summary": "JF3DTouchButton is a touch sensitive button built for 3D touch compatible devices.",
    "description": "JF3DTouchButton is a touch sensitive button built for 3D touch compatible devices. It provides additional state properties and transitional features to improve a user's 3D touch experience.",
    "homepage": "https://github.com/jfuellert/JF3DTouchButton",
    "license": {
        "type": "None",
        "file": "LICENSE"
    },
    "authors": {
        "jfuellert": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jfuellert/JF3DTouchButton.git",
        "tag": "0.0.6"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source_files": "JF3DTouchButton/JF3DTouchButton/**/*.{h,m}",
    "public_header_files": "JF3DTouchButton/JF3DTouchButton/JF3DTouchButton.h",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This