任何想法爲什麼我的代碼會崩潰?我正在將NSMutableArray
轉換爲NSString
,並使用該字符串獲取我的UIImageView
的網址。崩潰在NSURL
線。NSMutableArray到NSString到UIImageView代碼破解
NSString *imgstring = [imageOne componentsJoinedByString:@""];
NSURL *imageURL = [NSURL URLWithString:imgstring];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
dispatch_async(dispatch_get_main_queue(), ^{
// Update the UI
self.imageview.image = [UIImage imageWithData:imageData];
});
});
從崩潰中發佈堆棧跟蹤。 – Dex 2014-11-03 03:54:39
至少應包含* exact *和* complete *異常消息以及異常堆棧跟蹤以及相關代碼。 – 2014-11-03 04:03:04
https://www.dropbox.com/s/mg9ub3xlj2j5afx/Screen%20Shot%202014-11-02%20at%2011.03.35%20PM.png?dl=0 – user2868511 2014-11-03 04:05:26