0
我再次發佈這個問題,但更精確此時,與Objective-C的(再次,但更精確)保留
第一,我有這個功能誰返回一個字符串,沒有內存管理或一些錯誤這個功能可以嗎?
-(NSString *) motAvecCle:(NSString *) cle
{
NSString *motRetour;
motRetour = @"";
cle = [FonctionUtile concatener:[[tableauConfig singletonTableauConfig] langueAffichage] chaine2:@"_" chaine3:[FonctionUtile trim:[cle uppercaseString]] chaine4:@""];
motRetour = [FonctionUtile trim:[dictionnaireLangue objectForKey:cle]];
if (motRetour == nil) {
motRetour = @"Erreur";
}
return motRetour;
}
,當我把這個fonction,再次
NSString *myString = @"";
myString = [self motAvecCle:@"fr"]; // I must do this?
myString = [[self motAvecCle:@"en"]retain]; //or do this?
THX ...
你是對的。我刪除了我的答案。 – 2010-11-17 17:21:34