• Stars
    star
    352
  • Rank 116,775 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 9 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An animated hamburger button for iOS.

JTHamburgerButton

CI Status Version License Platform

An animated hamburger button for iOS.

Installation

With CocoaPods, add this line to your Podfile.

pod 'JTHamburgerButton', '~> 1.0'

Screenshots

Example

Usage

Basic usage

#import <UIKit/UIKit.h>

#import <JTHamburgerButton.h>

@interface ViewController : UIViewController

@property (weak, nonatomic) IBOutlet JTHamburgerButton *button;

@end
#import "ViewController.h"

@implementation ViewController

- (IBAction)didBackButtonTouch:(JTHamburgerButton *)sender
{
    if(sender.currentMode == JTHamburgerButtonModeHamburger){
        [sender setCurrentModeWithAnimation:JTHamburgerButtonModeArrow];
    }
    else{
        [sender setCurrentModeWithAnimation:JTHamburgerButtonModeHamburger];
    }
}

- (IBAction)didCloseButtonTouch:(JTHamburgerButton *)sender
{
    if(sender.currentMode == JTHamburgerButtonModeHamburger){
        [sender setCurrentModeWithAnimation:JTHamburgerButtonModeCross];
    }
    else{
        [sender setCurrentModeWithAnimation:JTHamburgerButtonModeHamburger];
    }
}

@end

The method setCurrentModeWithAnimation animates the transition from one mode to another. There is also setCurrentMode which changes the view without transition.

There are three modes:

  • JTHamburgerButtonModeHamburger
  • JTHamburgerButtonModeArrow
  • JTHamburgerButtonModeCross

Customize the design

  • lineHeight
  • lineWidth
  • lineSpacing
  • lineColor
  • animationDuration

After the change of one of this properties you have to call updateAppearance to update the view.

Requirements

  • iOS 7 or higher
  • Automatic Reference Counting (ARC)

Author

License

JTHamburgerButton is released under the MIT license. See the LICENSE file for more info.

More Repositories

1

JTCalendar

A customizable calendar view for iOS.
Objective-C
2,763
star
2

JTMaterialTransition

An iOS transition for controllers based on material design.
Swift
961
star
3

JT3DScrollView

ScrollView with custom effects during the scroll for iOS
Shell
492
star
4

JTNumberScrollAnimatedView

A scroll animation for display number for iOS
Objective-C
208
star
5

JTMaterialSpinner

An iOS material design spinner view
Swift
129
star
6

JTSlideShadowAnimation

A shadow animation effect for iOS
Objective-C
89
star
7

JTImageLabel

JTImageLabel keeps a UILabel and a UIImageView side by side on iOS.
Objective-C
79
star
8

JTTableViewController

A ViewController for manage pagination and loaders for iOS.
Swift
61
star
9

JTBorderDotAnimation

A simple animation with dots turning around a UIView for iOS
Objective-C
56
star
10

jt-rails-address

Postal addresses management in Ruby On Rails and Javascript
Ruby
41
star
11

flutter_cast

Dart package to discover and connect with Chromecast devices
Dart
41
star
12

JTScrollViewController

Create a ScrollViewController on iOS pragmatically using Auto Layout without a nib file.
Objective-C
31
star
13

flutter_brother_printer

Objective-C
11
star
14

jt-translator-ios

Remotely manage your translations on iOS
Swift
8
star
15

spotify-playlist

Remove the songs added to the playlist "Remove from spotify" from every playlists
Ruby
6
star
16

BRLMPrinterKit

Pod for the BRLMPrinterKit / Brother's printers
Objective-C
4
star
17

jt-rails-generator-user

Generate a scaffold for user authentication in Ruby On Rails.
Ruby
4
star
18

JTHelper

List of common helpers for iOS projects
Objective-C
3
star
19

SUPINFO-B3-iOS

Objective-C
3
star
20

jt-rails-meta

Manage HTML meta tags for SEO in Ruby On Rails
Ruby
3
star
21

vagrant-rails-dev

Vagrant file for Ruby On Rails development
Shell
3
star
22

jt-rails-toolbox

Common libs used for Ruby On Rails development.
Ruby
2
star
23

paperclip-storage-http

HTTP storage support for paperclip.
Ruby
2
star
24

base-static-site

Base scaffold for simple static website using compression and minification
Shell
2
star
25

jt-rails-tokenizable

Token generation for ActiveRecord models in Ruby On Rails
Ruby
2
star
26

omniauth-gocardless-oauth2

OmniAuth Strategy for GoCardless via OAuth2
Ruby
2
star
27

chrome-password-reminder

Chrome extension password reminder
JavaScript
2
star
28

flutter_socket_mobile

Java
1
star