Giter Club home page Giter Club logo

ninaselectionview's Introduction

![image](https://github.com/RamWire/NinaSelectionView/blob/master/Example/Gifs/Slice header2.png) Language Pod Version Pod Platform Pod License
πŸ‡¨πŸ‡³δΈ­ζ–‡ζ–‡ζ‘£θ―΄ζ˜Ž

  • A dramatic way to select your buttons by NinaSelectionView.

Features

  • Low coupling to pop NinaSelectionView,just with one-line code methods to use it.
  • Like AliPay pop style,and you can use it more flexible.
  • Supports 12 pop styles,you can pop from above,below,left and right.
  • Pop to anywhere as you wish.
  • Support scroll when NinaSelection's height or width is longer than screen's.
  • NinaSelectionView buttons can drag and exchange as you wish.
  • Support Spring animation and normal animation.

Preview

Pop Styles

image image image image

Drag Feature

image

LongScrollState

image image image

Installation

Drop in the Classes folder to your Xcode project.
You can also use cocoapods.

Using CocoaPods

Add pod 'NinaSelectionView' to your Podfile and run pod install.

pod 'NinaSelectionView'

Usage

You need add 'NinaSelectionView.h'(CocoaPods) to your project.Then load the codes:

NinaSelectionView *ninaSelectionView = [[NinaSelectionView alloc] initWithTitles:[self titlesArray] PopDirection:NinaPopFromAboveToTop];
[self.view addSubview:ninaSelectionView];

Then when you wanna show or dismiss NinaSelectionView,you need use:

[self.ninaSelectionView showOrDismissNinaViewWithDuration:0.5 usingNinaSpringWithDamping:0.8 initialNinaSpringVelocity:0.3];

or

[self.ninaSelectionView showOrDismissNinaViewWithDuration:0.5];

Yeah,that's all!

Other Settings and Tips

  • You can set necessary Array by following codes(please read the Example notes if you wanna to know more).
NSArray *titleArray = @[
                        @"Curry",
                        @"Thompson",
                        @"Green",
                        @"Iguodala",
                        @"Durant"
                        ];
  • To complete button actions,you need write NinaSelectionDelegate in your codes:
- (void)selectNinaAction:(UIButton *)button {
    NSLog(@"Choose %li button",(long)button.tag);
}
  • You can also set defaultSelected button,start from 1.
_ninaSelectionView.defaultSelected = 1;
  • Meanwhile,shadow background also can be set.(You must set shadowEffect to YES first,then you can set shadowalpha)
_ninaSelectionView.shadowEffect = YES;
_ninaSelectionView.shadowAlpha = 0.4;
  • If you wanna change buttons' parameters(column,width,height) or view frame,you can go to UIParameter.h to change them.

Change Log

####v0.1.0 First Release.

FeedBack

  • If you find bugs in this project or any suggestions,hope you can give me feedback by issues or Email me to [email protected].

Licence

This project uses MIT License.

ninaselectionview's People

Contributors

ramwire avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.