iphone - Remove Custom View from superView -


i have own uiview :

#import <uikit/uikit.h>  @interface multipleslotsclientview : uiview   -(ibaction)didpressclosebtn:(id)sender;  @end 

and implementation:

@implementation multipleslotsclientview  - (id)initwithframe:(cgrect)frame {     self = [[[[nsbundle mainbundle] loadnibnamed:@"multipleslotsclientview" owner:self options:nil] objectatindex:0] retain];     if (self) {         self.frame = frame;     }     return self; }  #pragma mark #pragma mark ibaction  -(ibaction)didpressclosebtn:(id)sender {     [self removefromsuperview]; }  @end 

and have btn connect didpressclosebtn method , when press button method called view won't remove superview.

this how alloc uiview , add it:

multipleslotsclientview *multiview = [[[multipleslotsclientview alloc] initwithframe:self.view.frame] autorelease]; [self.view addsubview:multiview]; 

any idea why view won't disappear?

just try connect below screenshot, don't connect fileowner.enter image description here


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -