objective c - UIActionSheet pass touches through? -


i'm looking use uiactionsheet kind of contextual message box (with no action buttons @ , label in bubble arrow pointing @ something). since there no actions user can take, not require tap dismiss, can't see way (such passthroughviews property) allow this.

it's not designed this, happen handy it.

this example code of how show uialertview , dismiss automatically.

show it:

- (void)show  {      uialertview* alert = [[uialertview alloc] initwithtitle:@"title"                                                delegate:self                                       cancelbuttontitle:nil                                       otherbuttontitles:nil];      alert.tag = tag;      [alert show]; } 

dismiss it:

- (void)dismiss {     (uiwindow* w in [uiapplication sharedapplication].windows)         (nsobject* o in w.subviews)             if ([o iskindofclass:[uialertview class]]) {                 uialertview *alert = (uialertview*) o;                 if (alert.tag == tag)                     [alert dismisswithclickedbuttonindex:[(uialertview*)o cancelbuttonindex] animated:yes];             } } 

yo can call dismiss method after couple of seconds:

[self performselector:@selector(dismiss) withobject:nil afterdelay:1.0 inmodes:nil]; 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -