Objective C: Create a new View in touches end
I'm trying to do a program that everytime my touches end, another UIView will appear using a loop for as many as UIView I want. How can I set a loop of UIView in my touches end? or should I create it in viewDidLoad and call it in touches end?

 

    -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event//upon leaving
        {
            UITouch *touch = [touches anyObject];
            
            for (int i=0; i < 100; i++) {
                UIImageView *layerView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 1024, 768)];
                [layerView setAlpha:.05];
                [self.view addSubview:layerView];
            }
        }

Hope you can help me guys..
 



Objective C: Create a new View in touches end
===

I'm trying to do a program that everytime my touches end, another UIView will appear using a loop for as many as UIView I want. How can I set a loop of UIView in my touches end? or should I create it in viewDidLoad and call it in touches end?

 

    -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event//upon leaving
        {
            UITouch *touch = [touches anyObject];
            
            for (int i=0; i < 100; i++) {
                UIImageView *layerView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 1024, 768)];
                [layerView setAlpha:.05];
                [self.view addSubview:layerView];
            }
        }

Hope you can help me guys..
 


