Way to select your buttons.
🇨🇳ä¸æ–‡æ–‡æ¡£è¯´æ˜Ž
Drop in the Classes folder to your Xcode project.
You can also use cocoapods.
Add pod 'NinaSelectionView'
to your Podfile
and run pod install
.
pod 'NinaSelectionView'
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!
NSArray *titleArray = @[
@"Curry",
@"Thompson",
@"Green",
@"Iguodala",
@"Durant"
];
- (void)selectNinaAction:(UIButton *)button {
NSLog(@"Choose %li button",(long)button.tag);
}
_ninaSelectionView.defaultSelected = 1;
_ninaSelectionView.shadowEffect = YES;
_ninaSelectionView.shadowAlpha = 0.4;
First Release.
This project uses MIT License.