Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xcodebuild/uitimefield
A iOS time input inspired by Android's timer app
https://github.com/xcodebuild/uitimefield
Last synced: 24 days ago
JSON representation
A iOS time input inspired by Android's timer app
- Host: GitHub
- URL: https://github.com/xcodebuild/uitimefield
- Owner: xcodebuild
- License: mit
- Created: 2015-05-23T01:44:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-24T04:56:38.000Z (over 9 years ago)
- Last Synced: 2024-10-31T16:12:42.414Z (about 2 months ago)
- Language: Objective-C
- Homepage:
- Size: 188 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![CocoaPods](https://img.shields.io/cocoapods/v/UITimeField.svg)](https://cocoapods.org/?q=UITimeField)
[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://raw.githubusercontent.com/CodeFalling/UITimeField/master/LICENSE)
[![platform](https://img.shields.io/badge/platform-iOS-blue.svg)]()
[![Build Status](https://travis-ci.org/CodeFalling/UITimeField.svg?branch=master)](https://travis-ci.org/CodeFalling/UITimeField)# UITimeField
A iOS time input inspire by Android's timer app# Preview
![preview](http://i1.tietuku.com/0f6503feaf19afeb.gif)
# Install
## Manual
Copy or use git module to import
```
├── UITimeField
│ ├── UITimeField.h
│ └── UITimeField.m
```## CocoaPods
```
platform :ios
pod 'UITimeField','1.1.1'
```# How to use
```objective-c
#import "UITimeField.h"
``````objective-c
UITimeField *_timeField = [[UITimeField alloc] initWithFrame:CGRectMake(20, 20, 260, 160)];
_timeField.hourUnit=@"h";
_timeField.minuteUnit=@"m";
_timeField.secondUnit=@"s";
[self.view addSubview:_timeField];
```Or add Custom View with `UITimeField` in your storyboard.
- You can use `_timeField.hour`,`_timeField.minute`,`_timeField.second` to get time.
- You can use `refresh` to let it refresh UI data
- You can use `setInput:(NSString *)timeStr` to set input string.(**notice that timeStr.length must <= 6)
**Notice** that `hour` bigger than 24 and `minute`/`second` bigger than 60 is **allowed**(Just like android timer's behaviour)