hy everyone,用[[object valueForKey:@「」] componentsJoinedByString:@「 n」]添加兩個值;
我真的需要幫助。 這裏是我的問題: 我有對象的數組,每個有兩個屬性: 1是一個NSString名 2是NSSNumber價格
現在我想通過陣列運行,所有的值添加到新字符串:
問題是我需要下面的輸出。 name(from object 1):price(from object 1)then new line(\ n) name(from object 2):price(from object 2)then new line(\ n)...等等。
會很棒,如果有人能幫助我這裏。 與親切的問候,托馬斯
你有你的數組中是什麼樣的對象?你的一個類的實例,一個NSDictionary? – Zoleas
是我的一個課程的實例,對不起,我沒有提到它在第一個地方。感謝您的回覆+ g + – Thomas