title: iOS touching a UIImageView
body: <pre><code>  - (void)viewDidLoad
   {
    [super viewDidLoad];
  // Do any additional setup after loading the view, typically from a nib.
     container = [[UIView alloc] initWithFrame:self.view.frame];
  UIImageView* main_im0 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon1.png"]];
  [container addSubview:main_im0];
  [self.view addSubview:container];
  
   }
  
   -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
  {
  UITouch *tt = [touches anyObject];
  
  UIImageView *touchedview=(UIImageView*)[tt view];
  
  
  NSArray *views = [container subviews];
  
  
  
   for (UIImageView* im in views)
   {
      UIImageView* focus=im;
      if (touchedview==focus)
      {
  
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I have this piece of code that setting up an ImageView called main_im0 which is put into a UIView container which then put into view. When I clciked on the main_im0, I expect the touch function would hit the condition of touchedview==focus.   However, I couldn't get that condition activated?  what's wrong?</p>