I have an image view,on that there are programmatically created UIButtons
. I want to delete these buttons through an UIActionSheet
. is this possible in an iPad? Please help me out.
Asked
Active
Viewed 623 times
0
2 Answers
0
-
i am facing one problem,whenever i am deleting a particular button,everytime the last button is getting deleted. – debina Oct 07 '13 at 09:27
0
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
using these actionsheet delegate method you can delete that programmaticlly created button for eg:
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
switch(buttonIndex)
{
case 0:
[button removefromsuperview];
}
}

Fogmeister
- 76,236
- 42
- 207
- 306

yhpets
- 87
- 1
- 11