How to open a new view when touching on a uiview?
صفحه اصلي

How to open a new view when touching on a uiview?

i have a scrollview with uiview added as how do i open a new view when i touch on the view???? i want a new view to appear...before this i have buttons on my button have the method "addtarget perform selector"...from that i am loading a new view here is an image of my view

alt text

Remote database connection with my iPhone application using Cocos2d


cross compiling c++ to iphone arm
For case try following code (add it to your view):. iPhone use of mutexes with asynchronous URL requests
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event  {     UITouch *touch = [touches anyObject];     NSUInteger tapCount = [touch tapCount];     CGPoint location = [touch locationInView:self.view];      switch (tapCount)     {          case 1:          {               UIView *view = [[UIView alloc] initWithFrame: CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];               view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;               view.backgroundColor = [UIColor whiteColor];                [self.view addSubview:view];               [view release];          }          break;     } } 
Cocoa-touch and UIButtonContent

36 out of 100 based on 46 user ratings 566 reviews