我有这样的无法点击一个UIButton这是对视图的右上方推后下一个视图
由tableview中的视图和一个UIButton当我点击“添加”一个名为“Locsetting”的新班级/ xib应该打开,但我无法做到。 我的代码:.h文件中
@interface LocationViewController : UIViewController <UITableViewDelegate,UITableViewDataSource>
{
UITableView *table;
NSMutableArray *menuList;
LocSetting *locSetting;
IBOutlet UIButton *addbutton;
}
@property (nonatomic,retain) NSMutableArray *menuList;
@property (nonatomic,retain) IBOutlet UITableView *table;
@property (nonatomic,retain) LocSetting *locSetting;
@property (nonatomic, retain) IBOutlet UIButton *addbutton;
-(IBAction)gotoLocSetting:(id) sender;
@end
My .m :
@synthesize addbutton;
-(IBAction)gotoLocSetting:(id) sender {
NSLog(@"gotoLocSetting Entered");
locSetting = [[LocSetting alloc]
initWithNibName:@"LocSetting"
bundle:nil];
//locationViewController.menuList = [menuList objectAtIndex:indexPath.row];
[self.navigationController pushViewController:locSetting
animated:YES];
[locSetting release];
}
我在做什么错误或请指导我?! 感谢
@DavidM!感谢编辑 – Alok 2011-04-06 11:31:12