Skip to content
Browse files

Readme changes, based off the blog post

  • Loading branch information...
1 parent f5ffb6b commit 7d227fa6dcf855e8477a86d8158954e66936c5a9 @reednj committed Oct 18, 2010
Showing with 31 additions and 0 deletions.
  1. +31 −0 Readme.md
View
31 Readme.md
@@ -1,2 +1,33 @@
TDSemiModal
===========
+
+Include like this:
+
+ #import "TDSemiModal.h"
+
+In order to show up your own modal view, just do this:
+
+ [self presentSemiModalViewController:newview];
+
+And to hide:
+
+ [self dismissSemiModalViewController:newview];
+
+A semi transparent 'cover' will be automatically put in to stop the user from interacting with the UI behind, so I recommend you set the background on your view to completely transparent.
+
+Obviously you can create whatever semi-modal view you want, but a datepicker must be one of the most common usages, so I knocked up a class for that too.
+
+The datepicker view itself is not too hard to use, just create and display as before:
+
+ #import "TDDatePickerController.h"
+ TDDatePickerController* datePickerView = [[TDDatePickerController alloc]
+ initWithNibName:@"TDDatePickerController"
+ bundle:nil];
+ datePickerView.delegate = self;
+ [self presentSemiModalViewController:datePickerView];
+
+Then you just need to catch the following actions in your delegate when the date is actually selected:
+
+ -(void)datePickerSetDate:(TDDatePickerController*)viewController;
+ -(void)datePickerClearDate:(TDDatePickerController*)viewController;
+ -(void)datePickerCancel:(TDDatePickerController*)viewController;

0 comments on commit 7d227fa

Please sign in to comment.
Something went wrong with that request. Please try again.