I have a button place on a view
partially... its one half is over the view and the other half is just sort of floating. So if A is my base view and B is placed over it and I have this button added over B. If i click on the button on the part which comes above B it receives the touch and performs the action, but if this touch is outside the area of B than the touch is not performed.... what am I doing wrong here... ? Any help is appreciated.
here is how I am adding the button.. I am trying to dynamically delete buttons similar to the way the apps are deleted in IOS.
UIButton *deletButton1 = [UIButton buttonWithType:UIButtonTypeCustom] ;
deletButton1.frame = CGRectMake(25, -5, 30,30);;
deletButton1.backgroundColor = [UIColor clearColor];
deletButton1.tag=1;
UIImage *buttonImageNormal1 = [UIImage imageNamed:@"delete.png"];
[deletButton1 setBackgroundImage:buttonImageNormal1 forState:UIControlStateNormal];
[deletButton1 addTarget:self action:@selector(deleteButton:) forControlEvents:UIControlEventTouchUpInside];
[self.addButton1 addSubview:deletButton1];
Here is a screen shot..