Skip to content

Commit

Permalink
updated read me
Browse files Browse the repository at this point in the history
  • Loading branch information
barrettj committed Jan 11, 2012
1 parent 47a4093 commit b7d568c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Expand Up @@ -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 {
Expand All @@ -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
------------------------
Expand Down

0 comments on commit b7d568c

Please sign in to comment.