最新の SDK と XCode 4.5.2 を使用して iPhone アプリケーションを開発しています。
ViewController には 2 つありUITableViewます。どちらも同じものを使用しUITableViewDataSourceます。私の質問は についてstatic NSString* CellIdentifier;です。
次のことはできますか?
- (UITableViewCell* )tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString* CellIdentifier;
SingletonGlobalVars* singleton = [SingletonGlobalVars sharedInstance];
if ([tableView isEqual:shopsList])
{
CellIdentifier = @"ShopCell";
}
else
{
CellIdentifier = @"ProductCell";
}
[ ... ]
}
変更する必要がありますが、静的変数CellIdentifierでこれを行うことができるかどうかわかりません。