Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
- UITouch *touch = [touches anyObject];
- NSUInteger tapCount = [touch tapCount];
- switch (tapCount) {
- case 1:
- [self performSelector:@selector(singleTapMethod) withObject:nil afterDelay:.4];
- break;
- case 2:
- [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(singleTapMethod) object:nil];
- [self performSelector:@selector(doubleTapMethod) withObject:nil afterDelay:.4];
- break;
- . . .
- }
- -(IBAction)buttonClick
- {
- //setup ur view dynamically as you like//
- PSview=[[UIView alloc]initWithFrame:CGRectMake(5, 5, 310,450)];
- PSview.backgroundColor=[UIColor blackColor];
- PSview.alpha=0.8;
- [PSview.layer setBorderColor: [[UIColor whiteColor] CGColor]];
- [PSview.layer setBorderWidth: 3.0];
- PSview.contentMode=UIViewContentModeScaleAspectFill;
- PSview.clipsToBounds=YES;
- [PSview.layer setBorderColor: [[UIColor whiteColor] CGColor]];
- [PSview.layer setBorderWidth: 3.0];
- [PSview addSubview:subView];
- [self.view addSubview:PSview];
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
- {
- //since there are two tables in one view, you can differentiate them using if()
- if(tableView==subView)
- {
- // ...ur code . ..
- // write your code what needs to happen when you click a row of your subView.
- [PSview removeFromSuperview];
- }
- if(tableView==mainView)
- {
- // write your code , what happens when user clicks row of the main table
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement