Permalink
Browse files

updated read me

  • Loading branch information...
1 parent 47a4093 commit b7d568c3abbe8f5fb830d81d61b6c16f8497ac61 @barrettj barrettj committed Jan 11, 2012
Showing with 16 additions and 1 deletion.
  1. +16 −1 README.md
View
@@ -85,8 +85,9 @@ Display the panel by creating an instance of your subclass and show it from a po
[self.currentPanel showFromPoint:[sender center]];
}
````
+** Event Handling
-You must also implement the delegate method for when the close button is pressed:
+You can either implement the delegate method for when the close button is pressed:
````objective-c
- (void)removeModalView {
@@ -103,6 +104,20 @@ You must also implement the delegate method for when the close button is pressed
}
````
+or use blocks
+````objective-c
+ self.currentPanel.onClosePressed = ^(UAModalPanel* panel) {
+ [panel hideWithOnComplete:^(BOOL finished) {
+ [panel removeFromSuperview];
+
+ if (panel == self.currentPanel) {
+ self.currentPanel = nil;
+ }
+ }];
+ };
+````
+
+
Step 4: Customize UAModalPanel
------------------------

0 comments on commit b7d568c

Please sign in to comment.