GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kamilpowalowski/HSDatePickerViewController: Customizable iOS view controller in Mailbox app style for picking date and time. https://twitter.com/kamilpowalowski

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
HSDatePickerViewControllerDemo.xcodeproj
HSDatePickerViewControllerDemo.xcodeproj
 
 
HSDatePickerViewControllerDemo
HSDatePickerViewControllerDemo
 
 
.gitignore
.gitignore
 
 
HSDatePickerViewController.podspec
HSDatePickerViewController.podspec
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
screen1.png
screen1.png
 
 
screen2.png
screen2.png
 
 

Repository files navigation

HSDatePickerViewController

HSDatePickerViewController is an iOS ViewController for date and time picking, based on awesome look&feel of Dropbox Mailbox application with some customization options.

HSDatePickerViewController screen HSDatePickerViewController screen

Usage

Use CocoaPods

pod 'HSDatePickerViewController', '~> 1.0'

or add sources from HSDatePickerViewControllerDemo/HSDatePickerViewController subfolder to your project.

Import main header:

#import "HSDatePickerViewController.h"

When needed, create HSDatePickerViewController object:

HSDatePickerViewController *hsdpvc = [[HSDatePickerViewController alloc] init];

present it as modal view controller:

[self presentViewController:hsdpvc animated:YES completion:nil];

To get returning values, you must conform to the protocol HSDatePickerViewControllerDelegate:

@protocol HSDatePickerViewControllerDelegate <NSObject>
- (void)hsDatePickerPickedDate:(NSDate *)date;
@optional
- (void)hsDatePickerWillDismissWithQuitMethod:(HSDatePickerQuitMethod)method;
- (void)hsDatePickerDidDismissWithQuitMethod:(HSDatePickerQuitMethod)method;
@end

Also, before presenting HSDatePickerViewController, you can change default values of some properties (check HSDatePickerViewController.h file for longer description):

@property (nonatomic, assign, getter=shouldDismissOnCancelTouch) BOOL dismissOnCancelTouch;

@property (nonatomic, assign) HSDatePickerMinutesStep minuteStep;

@property (nonatomic, strong) UIColor *mainColor;

@property (nonatomic, strong) NSDate *date;
@property (nonatomic, strong) NSDate *minDate;
@property (nonatomic, strong) NSDate *maxDate;

@property (nonatomic, strong) NSDateFormatter *dateFormatter;
@property (nonatomic, strong) NSDateFormatter *monthAndYearLabelDateFormater;

@property (nonatomic, strong) NSString *confirmButtonTitle;
@property (nonatomic, strong) NSString *backButtonTitle;

Licence (MIT)

Copyright (c) 2015 Kamil Powałowski @kamilpowalowski

For whole licence see LICENCE file.

About

Customizable iOS view controller in Mailbox app style for picking date and time. https://twitter.com/kamilpowalowski

Resources

Readme
MIT license
Activity

Stars

312 stars

Watchers

8 watching

Forks

55 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.