• Stars
    star
    377
  • Rank 113,535 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 9 years ago
  • Updated almost 5 years ago

Reviews

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

Repository Details

๐Ÿ”˜ Multi choice circle button with cool 3d parallax effect, but seriously don't use this in production now, I will rewrite it to a delegate based UIControl when I am available.

JZMultiChoicesCircleButton

JZ.jpg

[![CI Status](http://img.shields.io/travis/Fincher Justin/JZMultiChoicesCircleButton.svg?style=flat)](https://travis-ci.org/Fincher Justin/JZMultiChoicesCircleButton) Version License Platform

#Introduction JZMultiChoicesCircleButton is a Multi-choices button.
Just tap it and hold to your choice! yeah ,so cool, such easy.
It's inspired by Nicola Felasquez Felaco's work
And This is my implementation using ObjC, demo gif:
DemoGiF.gif

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

#import "JZMultiChoicesCircleButton.h"

- (void)viewDidLoad {
    [super viewDidLoad];

    NSArray *IconArray = [NSArray arrayWithObjects: [UIImage imageNamed:@"SendRound"],[UIImage imageNamed:@"CompleteRound"],[UIImage imageNamed:@"CalenderRound"],[UIImage imageNamed:@"MarkRound"],nil];
    NSArray *TextArray = [NSArray arrayWithObjects: [NSString stringWithFormat:@"Send"],[NSString stringWithFormat:@"Complete"],[NSString stringWithFormat:@"Calender"],[NSString stringWithFormat:@"Mark"], nil];
    NSArray *TargetArray = [NSArray arrayWithObjects:[NSString stringWithFormat:@"ButtonOne"],[NSString stringWithFormat:@"ButtonTwo"],[NSString stringWithFormat:@"ButtonThree"],[NSString stringWithFormat:@"ButtonFour"] ,nil];
    
    NewBTN = [[JZMultiChoicesCircleButton alloc] initWithCenterPoint:CGPointMake(self.view.frame.size.width / 2 , self.view.frame.size.height / 2 )
                                                                                      ButtonIcon:[UIImage imageNamed:@"send"]
                                                                                     SmallRadius:30.0f
                                                                                       BigRadius:120.0f
                                                                                    ButtonNumber:4
                                                                                      ButtonIcon:IconArray
                                                                                      ButtonText:TextArray
                                                                                    ButtonTarget:TargetArray
                                                                                     UseParallex:YES
                                                                               ParallaxParameter:300
                                                                           RespondViewController:self];
    [self.view addSubview:NewBTN];
    
}

ButtonIcon: UIImage,the icon in the small button
SmallRadius and BigRadius: CGFloat, Small button radius and the size when it's animated
ButtonNumber: int, how many buttons
ButtonIcon: NSArray of UIImage
ButtonText: NSArray of NSString
ButtonTarget : NSArray of NSString,just String of selector and JZMultiChoicesCircleButton will use NSSelectorFromString to transform it to SEL
UseParallex : BOOL, if YES will be 3D-like, or just 2D with no Parallex effect.
ParallaxParameter: CGFloat,bigger than 0, the smaller the cooler Parallex effect will be
RespondViewController: should be UIViewcontroller,the responder, simply 'self' will be ok.

- (void)SuccessLoadData
{
    [NewBTN SuccessCallBackWithMessage:@"YES!"];
}
- (void)ErrorLoadData
{
    [NewBTN FailedCallBackWithMessage:@"NO..."];
}

Use SuccessCallBackWithMessage and FailedCallBackWithMessage to show the animated infomation , or button will be full screen and don't disappear!!!!

Installation

JZMultiChoicesCircleButton is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "JZMultiChoicesCircleButton"

Or just grab JZMultiChoicesCircleButton.h and .m from github,
Edit

[UIImage imageNamed:@"CallbackSuccess" inBundle:bundle compatibleWithTraitCollection:nil];

With

[UIImage imageNamed:@"CallbackSuccess"];

and grab CallbackSuccess.png and CallbackWrong.png.

##TO-DO

1.Rewrite using scale down animation to prevent the blur CATextlayer

Author

Fincher Justin, [email protected]

License

JZMultiChoicesCircleButton is available under the MIT license. See the LICENSE file for more info.

More Repositories

1

GitHubContributionsiOS

Show off your GitHub contributions from your lock screen ๐Ÿ“ฑ
Objective-C
499
star
2

JZtvOSParallaxButton

๐Ÿ“บ tvOS Button with Parallax Effect (ObjC)
Objective-C
163
star
3

WWDC2022-SwiftUINodeEditor

[WWDC 22 Swift Student Challenge Winner] Pegboard, a SwiftUI based node-editor workspace for game dev and more
Swift
163
star
4

WebDrop

๐Ÿ’ป Share your Mac's current chrome tab via airdrop
Objective-C
116
star
5

BoardForGitHub

A small application to monitor your GitHub project web page in a webview-based native macOS app
Objective-C
80
star
6

FlutterClock

Conic Clock for Flutter Clock challenge
Dart
62
star
7

WWDC2021ScholarshipProject

HumanScan for WWDC 21 Swift Student Challenge
Swift
59
star
8

WWDC20Playground

WWDC20 Swift Student Challenge Winner (Actually a WWDC 19 project but reworked & rebranded)
Swift
48
star
9

WWDC19Playground

WWDC 19 Application (Status: rejected), use Node Editor to write audio visualization shader with no code!
Swift
36
star
10

UniLWP.Droid.Package.Free

Open-sourced version of UniLWP.Droid, an Android live wallpaper solution for Unity 2019.3+
34
star
11

JZGlitchLabel

๐Ÿ”ช After effects glitch style UIView
Objective-C
26
star
12

ASWP-for-macOS

ArtStation set as wallpapers from https://www.artstation.com/artwork.rss
Objective-C
25
star
13

FastDepth-CoreML

a CoreML version of FastDepth
Swift
24
star
14

Vortex-Experiments

Open-sourced version of Vortex Data-driven Live Wallpaper for Android Experiemnts
C#
22
star
15

WebViewTextureiOS

iOS WebView to Unity Texture
Objective-C
19
star
16

JazzHands_Intro_Example

:trollface: an example for how to use JazzHands to make a intro
Objective-C
16
star
17

CV

My resume in Markdown & LaTeX format.
CSS
8
star
18

WWDC-18-Scholarship-Project

Play golf!
Swift
7
star
19

ProjectSkylineLandingWebGL

Code for a ready-to-launch side project.
JavaScript
6
star
20

PASSBUSTER

๐Ÿ”‘ iOS Password manager done for college work
Objective-C
6
star
21

UniLWP.Droid.Free.JavaSource

Java source for UniLWP.Droid free version
Java
5
star
22

CetaceaV1

Place for Cetacea V1
Objective-C
4
star
23

ProjectCrap

crappy website running on
JavaScript
4
star
24

NEU-CSYE6200-DayCare

Java
4
star
25

MacNativeSideWallpaperDemo

Objective-C
4
star
26

Fincher.im

http://fincher.im/
HTML
3
star
27

Mesh2Voxel

a little tool to make polygon to voxel
Objective-C
3
star
28

JZMDFabAnimation

๐ŸŽˆ material design fab animation test demo
Objective-C
3
star
29

some_school_homework

ๅคงๅญฆ่ฏพ่ฎพไฟๅญ˜ไป“ๅบ“
Objective-C
3
star
30

EVE-Online-Models-Textures

EVE - Online Models + Textures from the Game itself
2
star
31

AReco

Hackathon Project For HHHackathon
C#
2
star
32

Portfolio

This is pre-rendered from a SPA vue.js app
HTML
2
star
33

JZAugmentedRealityKit

Location-based AR(Augmented Reality) Kit written in Objective-C
Objective-C
2
star
34

SocketMessager

School Homework.
Objective-C
2
star
35

NodeEditorSwift

Swift
2
star
36

ProjectSkylineManual

1
star
37

JustinFincher

Haotian Zhengโ€˜s GitHub Profile Repo
1
star
38

NodeEditorObjC

Objective-C
1
star
39

LogMeowJava

Kotlin
1
star