-2
NSDirectoryの使い方を理解するために何か助けが必要ですが、NSStringやNSDictionaryのデータをクラスAの別のNSDictionaryのクラスBに挿入することが可能かどうか分かりませんNSDictionary use
クラスA
String
NSString *TwitterToken = accessTokenTwt;
NSString *twitterSecretToken = accessTokenSecret;
NSDictionary take the tokenExpires or another
- (NSMutableDictionary *)tokenAsDictionary
{
NSMutableDictionary *tokenDictionary = [[NSMutableDictionary alloc] init];
tokenDictionary[@"key"] = self.key;
tokenDictionary[@"secret"] = self.secret;
tokenDictionary[@"tokenExpires"] = @(self.tokenExpires);
tokenDictionary[@"requestAuthUrl"] = self.requestAuthUrl;
if (self.verifier) {
tokenDictionary[@"verifier"] = self.verifier;
}
return tokenDictionary;
}
クラスB
NSMutableDictionary *args = [[NSMutableDictionary alloc] init];
[args setObject: [Insert here data from class A] forKey:@"access_token"];
[args setObject: @"1" forKey:@"expires"];
はいあなたは別のNSDictionaryの –
感謝にNSDictionaryのを追加することができます!私はクラスAから辞書を得ることができます –