Ich brauche irgendeine Art von Hilfe mit einer Erklärung zu verstehen, wie ein NSDirectory verwenden, ich weiß nicht, ob es möglich ist, ein NSString oder NSDictionary Daten aus einer Klasse "A" in einem anderen NSDictionary in Klasse BNSDictionary verwenden
einfügenKlasse 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;
}
Klasse B
NSMutableDictionary *args = [[NSMutableDictionary alloc] init];
[args setObject: [Insert here data from class A] forKey:@"access_token"];
[args setObject: @"1" forKey:@"expires"];
Ja sicher, dass Sie eine NSDictionary zu einem anderen NSDictionary –
Dank hinzufügen können! aber wie kann ich das Wörterbuch von Klasse A bekommen –