0
我有一个导航栏有一个自定义按钮,该按钮的点击事件有一个自定义弹出菜单,有一个表,当我点击表行didselectrowatindexpath方法没有调用。导航栏事件问题
我使用此代码,请解决此
这里
-(void)backButtonClicked1
{
// create and configure the view
CGRect cgRct = CGRectMake(220, 30, 93, 135); //define size and position of view
myView = [[UIView alloc] initWithFrame:cgRct];
myView.backgroundColor=[UIColor clearColor];
[myView setUserInteractionEnabled:YES];
UIButton *btnpop=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 93, 140)];
[btnpop setUserInteractionEnabled:YES];
[btnpop setImage:[UIImage imageNamed:@"[email protected]"] forState:UIControlStateNormal];
[myView addSubview:btnpop];
//[self.navigationController.navigationBar bringSubviewToFront:myView];
// [myView release];
table = [[UITableView alloc]initWithFrame:CGRectMake(1,20,90,114)
style:UITableViewStylePlain];
[table setUserInteractionEnabled:YES];
table.backgroundColor = [UIColor clearColor];
table.separatorColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"[email protected]"]];
table.scrollEnabled=NO;
table.layer.borderColor = [UIColor clearColor].CGColor;
table.layer.borderWidth=1.0;
table.layer.cornerRadius = 4;
[table setDataSource:self];
[table setDelegate:self];
[myView addSubview:table];
myView.autoresizesSubviews = YES;
//allow it to tweak size of elements in view
[self.navigationController.navigationBar addSubview:myView];
[self.navigationController.navigationBar bringSubviewToFront:table];
}
我没有看到任何didSelectRowAtIndexPath方法在你提供的代码,关心上传呢? – 2012-03-24 09:21:44