-2
標籤我的UIViewController與UITableView的,我給在3 example.now的UIViewController中標記的看法,我想認識在TouchBegin方法這個標籤編號:的UITableView在TouchBegin
-(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
UITouch *touch = [[touches allObjects] objectAtIndex:0];
CGPoint finger = [touch locationInView:self];
int x = finger.x;
int y = finger.y;
int z = self.tag;
}
和問題是z總是0,我如何修改它的工作?
你能發表更多的代碼嗎?上下文不清楚。 – csano 2011-05-30 23:52:59
這是代碼,在viewDidLoad我把:self.view.tag = 3; 。然後我寫touchBegan方法,並希望得到這個標籤號碼,我總是得到0當我觸摸UITableView – yosifz8 2011-05-30 23:56:42
這個代碼在哪裏?你想做什麼? – 2011-05-31 00:02:21