Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to assign separate memory spaces of same type of class
- add{
- UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"pah%d",tagNum]];
- TouchImageView *touchImageView = [[TouchImageView alloc] initWithFrame:imageRect];
- imageCounter++;
- touchImageView.tag = imageCounter;
- touchImageView.image = image;
- touchImageView.center = CGPointMake(160.0, 230.0);
- [view addSubview:touchImageView];
- }
- undo{
- [[self.view viewWithTag:imageCounter] removeFromSuperview];
- imageCounter--;
- }
- UIImageView *imageView = touchImageView;
- for(UIImageView *iV in view.subviews)
- {
- if(iV == imageView)
- {
- [iV removeFromSuperView];
- }
- }
Add Comment
Please, Sign In to add comment