所以我想知道是否可以在單元格的detailTextLabel中顯示一個小圖像? (我收到從URL圖像),我試了一下:你可以在detailTextLabel單元格中顯示一個小圖像嗎?
NSString *thumbs = [NSString stringWithFormat:@"%@", TableText3];
cell.detailTextLabel.text = thumbs;
但出於明顯的原因無法正常工作。我也嘗試過:
UIImage *thumbs = [UIImage imageWithData:[NSData dataWithContentsOfURL:
[NSURL URLWithString:TableText3]]];
cell.detailTextLabel.text = thumbs;
這也(顯然)不起作用,因爲我傳遞圖像到字符串參數。
令人驚訝我沒有找到在WWW上任何東西。 (搜索參數爲:「在detailTextLabel圖像」或圖片,或只是爲textLabel和形象,各種變化)
嗯,是的,但那麼它就會顯示在左上角,我希望我能在detailTextLabel顯示。 – Blade 2012-03-05 22:38:52
我想你可以將imageView的框架更改爲 – Letrstotheprez 2012-03-05 22:40:56
,但我希望能有更好的解決方案。不過謝謝。 – Blade 2012-03-05 22:42:53