2011-06-24 6 views
0
@implementation SlideShowViewController 
- (id)init 
{ 
    NSString *temp = [NSString alloc]; 
    [temp stringwithString:@"http://www.inetwallpaper.com/homescreenhero/sunsets/wall009.jpg"]; 
    temp=[(NSString *)CFURLCreateStringByAddingPercentEscapes(
                   nil, 
                   (CFStringRef)temp,      
                   NULL, 
                   NULL, 
                   kCFStringEncodingUTF8) 
      autorelease]; 
    NSData *dato = [NSData alloc]; 
    dato=[NSData dataWithContentsOfURL:[NSURL URLWithString:temp]]; 
    if (self = [super initWithNibName:nil bundle:nil]) 
    { 
     NSArray * images = [NSArray arrayWithObjects:[UIImage imageWithData:dato],[UIImage imageWithData:dato], [UIImage imageWithData:dato], [UIImage imageWithData:dato], [UIImage imageWithData:dato], nil]; 

     self.view = [[[SlideShowView alloc] initWithImages:images] autorelease]; 
    } 

    return self; 
} 

画像を交換するためのURLを使用しているとき、私は、サーバーから画像をロードし、フォトアルバムクラッシュ

のこととして、それを表示するには、次のコードを使用しかし、コードが実行されると、それは エラーメッセージがクラッシュします54:

2011-06-24 23を、以下の通りであるコンソールに01.837 スライドショー[13654:207] * - [NSPlaceholderString stringwithString:]:未認識 セレクタ012 0x49117e0インスタンスに送信しました2011-06-24 23:54:01.839 スライドショー ' ** - [NSPlaceholderString stringwithString:]:[13654:207] キャッチされない例外により 'NSInvalidArgumentException'、理由に アプリを終了する未認識 セレクタ54:01.840 スライドショー[13654:207]スタック:インスタンス0x49117e0' 2011-06-24 23に送られる( 42178640、 43336492、 42187355、 41649782、 41646578、 12567、 7791、 2906510、 2910543、 2936126、 2917623、 2949592、 51171708、 41457820、 41453736、 2908705)のURLが画像によって置換される場合、それが動作 'NSException'

のインスタンスを投げた後に呼び出さ終了します いずれかが、私は

おかげ

答えて