2011-12-26 22 views
1

このアプリケーションには文字列ではなくpdfを入力します。どのようにできるのか ?私はそれが関数にあると思う - (void)createContentPages ...助けをたくさんありがとう。UIPageViewControllerアプリケーション - pdfで埋め込む

使用するサンプルコードである:

http://www.techotopia.com/index.php/An_Example_iOS_5_iPhone_UIPageViewController_Application

iはcreateContentPagesを変更し、それはくそを行い、iが推測通常、それは(iは思われ、画像と試みた画像のパスのみを示しています簡単に...):あなたが引用されているサンプルコードで

- (void) createContentPages 
{ 
    NSFileManager *filemgr; 
    NSArray *filelist; 
    int count; 

    int j; 
    j = 0; 
    NSMutableArray *pageStrings = [[NSMutableArray alloc] init]; 

    filemgr = [NSFileManager defaultManager]; 
    filelist = [filemgr contentsOfDirectoryAtPath:[NSString stringWithFormat:@"%@/img", [[NSBundle mainBundle] bundlePath]] error:NULL]; 
    count = [filelist count]; 

    for (int i = 0; i < 3; i++) 
    { 
     NSString *path = [NSString stringWithFormat:@"%@/img/Diapositive", [[NSBundle mainBundle] bundlePath]]; 
     NSString *intString = [NSString stringWithFormat:@"%d", i]; 
     NSString *concatinatedString = [path stringByAppendingString:intString]; 

     NSString *final = [concatinatedString stringByAppendingString:@".png"]; 


     [pageStrings addObject: final]; 
    } 
    pageContent = [[NSArray alloc] initWithArray:pageStrings]; 


} 

答えて

1

、ベース・ビューは、HTMLなどのコンテンツを解釈するのUIWebView、です。ファイルパスを渡すだけでは機能しません。コンテンツが必要な場合は、適切なHTMLページにラップする必要があります。

関連する問題