Objective c 如何将参数传递给from:toObject:selector:?
我有一个有几行的桌面视图。当选择一行时,我需要执行选择器。我是这样做的:Objective c 如何将参数传递给from:toObject:selector:?,objective-c,ios4,three20,ttnavigator,Objective C,Ios4,Three20,Ttnavigator,我有一个有几行的桌面视图。当选择一行时,我需要执行选择器。我是这样做的: [TTTableTextItem itemWithText:NSLocalizedString(@"Cash","Title:Cash") URL:[NSString @"tt://payment/add/%d",5] accessoryURL:[NSString stringWithFormat:detail,5]], 并宣布: ..................... TTURLMap* ma
[TTTableTextItem
itemWithText:NSLocalizedString(@"Cash","Title:Cash")
URL:[NSString @"tt://payment/add/%d",5]
accessoryURL:[NSString stringWithFormat:detail,5]],
并宣布:
.....................
TTURLMap* map = [TTNavigator navigator].URLMap;
[map from:@"tt://payment/add/(source:)" toObject:self selector:@selector(addPayment:)];
.....................
- (void) addPayment:(PaymentType)theType {
ALog(@"%ld",theType);
}
但是,类型始终为0。那么,如何传递参数呢?一种方法(我认为)是:
[map from:@"tt://payment/add/(addPayment:)" toObject:self];
括号中的addPayment:
表示要调用的self
选择器。一种方法(我认为)是:
[map from:@"tt://payment/add/(addPayment:)" toObject:self];
括号中的
addPayment:
表示要调用的self
选择器。您的数据源是什么?表视图不存储自己的数据。您是否使用了正确的协议?您的数据源是什么?表视图不存储自己的数据。您是否使用了正确的协议?这与数据源无关。问题是,我需要将参数传递给类型为from:toObject:selector:的URL。这与datasource无关。问题是我需要将一个参数传递给类型为from:toObject:selector:的URL。