I have a UITableView. There are about 5 cells/rows in it.
In each cell there's a button. When a user clicks on the button i need to Display an animated View on top of it. (This view should get animated and displayed from bottom)
- According to my code the view doesn't get displayed. How can i solve this?
- I need to know how to display the view that animated from the bottom ?
- I need the size of the view to take the exact size of the table cell. How can i do this?
my code: cellForRowAtIndexPath
[cell.button addTarget:self action:@selector(buttonclick:) forControlEvents:UIControlEventTouchUpInside];
- (void) buttonclick:(id) sender {
NewView *newView = [[NewView alloc] init];
newView.center = CGPointMake(self.view.frame.size.width/2, self.view.frame.size.height/2);
[self.view addSubview: newView];
in the custom view class
-(id)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
[[NSBundle mainBundle] loadNibNamed:@"myview" owner:self options:nil];
self.bounds=self.myview.bounds;
[self addSubview:self. myview];
}
return self;
}