How to dismiss UIActionSheet automatically

iphone, iphone-sdk-3.0

Solution

Use:

- (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated

Problem

I have a requirement where i am showing actionSheet but in case user does not dismiss this actionsheet by selecting one of the option, i want to dismiss this automatically by program on a particular event. Any idea guys, how can i dismiss this actionsheet progratically?

Original source