0
在我cocos2D上(cocos2d的0.99.5版本)項目i集成一個UIView如下面的代碼的UITableView在cocos2d(不能選擇行)
tView = [[UIView alloc] initWithFrame:CGRectMake(-90,85,480,320)]; // ypo,xpos,width,height
CGAffineTransform tr = tView.transform; // get current transform (portrait)
tr = CGAffineTransformRotate(tr, (M_PI/2.0)); // rotate 90 degrees to go landscape
tView.transform = tr; // set current transform (landscape)
[[[CCDirector sharedDirector] openGLView] addSubview:tView];
,並添加一個UITableView爲孩子tView像這個
tTableView = [[UITableView alloc] initWithFrame:CGRectMake(0,50,480,320)
style:UITableViewStylePlain];
tTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
tTableView.delegate = self;
tTableView.dataSource = self;
[tTableView reloadData];
[self.pView addSubview:tTableView];
UITableView添加正確,但我不能在tableview.it中選擇一行滾動以及。如何解決這個問題。請給點建議
謝謝。