title: Button action not working in iphone?
body: <p>I have an IPhone application in which i am adding a custom view inspite of a navigation bar view.i am hiding that custom view in the normal case and unhide it whenever needed.now i am adding a button to that custom view having an action .but when i am clicking on it there is no action is working.can anybody help me?here is my code snippet in the view didload`</p>
  
  <pre><code>curtainsView=[[UIImageView alloc]init];
  curtainsView.image=[UIImage imageNamed:@"curtains.png"];
  curtainsView.frame=CGRectMake(0,-44, 320, 60);
  curtainsView.backgroundColor=[UIColor clearColor];
  UIImage *button2Image = [UIImage imageNamed:@"scroll_down.png"];
  scroll = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
  self.scroll.tag=100;
  [scroll setImage:button2Image forState:UIControlStateNormal];
  self.scroll.frame = CGRectMake(270,0, 40,40);
  [scroll addTarget:self action:@selector(backpressed:) forControlEvents:UIControlEventTouchUpInside]; 
  [self.curtainsView addSubview:scroll];
  [self.view addSubview:curtainsView];
  [self changeNavigationBarTitleTo:@""];
  [curtainsView setHidden:YES];
  </code></pre>