FTPickerView 1.0.2

FTPickerView 1.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release May 2018

Maintained by liufengting.




  • By
  • liufengting

FTPickerView

Twitter GitHub license Version CI Status GitHub stars

A simple UIPickerView/UIDatePicker wrapper.

Features

  • singleton
  • block callbacks

ScreenShots

Useage

  • Simple Picker
    //simple picker
    [FTPickerView showWithTitle:@"Choose a step"
                      nameArray:self.optionArrayOne
                      doneBlock:^(NSInteger selectedIndex) {
                          [sender setTitle:_optionArrayOne[selectedIndex] forState:UIControlStateNormal];
                      } cancelBlock:^{

                      }];
  • Date Picker
    //date picker
    [FTDatePickerView showWithTitle:@"Choose a date"
                         selectDate:nil
                     datePickerMode:UIDatePickerModeDateAndTime
                          doneBlock:^(NSDate *selectedDate) {
                              NSDateFormatter *dateFormate = [[NSDateFormatter alloc]init];
                              [dateFormate setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
                              [sender setTitle:[dateFormate stringFromDate:selectedDate] forState:UIControlStateNormal];
                          } cancelBlock:^{
                              
                          }];

Installation

Manual

  • Drag 'FTPickerView' file to you project,
  • Import 'FTPickerView.h',
  • Enjoy! 🍺

Cocoapods

  • add the following line to you podFile,then pod update
   pod 'FTPickerView', '~> 0.1.1'

License

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