我知道這對於某人來說很容易。我需要組合對象來創建一個地址。我不知道該怎麼做。我想...附加字符串
NSString *agcstr = [infoDictionary objectForKey:@"physstr"];
NSString *agccity = [infoDictionary objectForKey:@"physcity"];
NSString *agcstate = [infoDictionary objectForKey:@"physstate"];
NSString *agczip = [infoDictionary objectForKey:@"physzip"];
dvController.agcaddress = [agcstr stringByAppendingString:@"\n" stringByAppendingString:agccity stringByAppendingString:@", " stringByAppendingString:agczip];
這是完全錯誤的,但我總是至少嘗試的東西:)
那麼你做的方式是絕對正確的,雖然它可能看起來很奇怪。 – 2011-12-27 06:38:25