https://github.com/bismasaeed00/bshourpicker
You can replace your keyboard with a picker which shows custom hours.
https://github.com/bismasaeed00/bshourpicker
custom-hours ios keyboard objective-c textfield timepicker
Last synced: about 1 year ago
JSON representation
You can replace your keyboard with a picker which shows custom hours.
- Host: GitHub
- URL: https://github.com/bismasaeed00/bshourpicker
- Owner: bismasaeed00
- Created: 2017-04-06T07:36:21.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-06T07:44:33.000Z (about 9 years ago)
- Last Synced: 2025-03-24T08:47:54.874Z (about 1 year ago)
- Topics: custom-hours, ios, keyboard, objective-c, textfield, timepicker
- Language: Objective-C
- Size: 23.4 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BSHourPicker
You can replace your keyboard with a picker which shows custom hours.

## How To Get Started
Download the project and drop BSDropDownClass into your project.
Don't forget to import the header file.
```
#import "BSHourPicker.h"
```
Drag a textfield in your storyboard and assign BSHourPicker it's custom class.
Implement the delegate methods and set hours you want to display in picker.
```
_txtHours.pickerDelegate=self;
[_txtHours setDisplayHours:@[@"3",@"4",@"5",@"6"]];
```
### Delegate Methods
```
#pragma mark - BSHourPicker Delegate Methods
-(BOOL)shouldShowPicker:(BSHourPicker *)picker{
return YES;
}
-(void)timePicker:(BSHourPicker *)picker selctedItem:(NSString *)item{
NSLog(@"selected item: %@",item);
}
```
I made this for my personal use but if you need anything else in it, feel free to branch and submit a pull request. I'll add it.
Happy codding!!!