2011-12-26 3 views
1

이 응용 프로그램을 채우고 싶지만 문자열 대신 pdf로 채 웁니다. 내가 어떻게 할 수 있니? 나는 그것이 함수에 있다고 생각한다 - (void) createContentPages ... 도움을 많이 주셔서 감사합니다. 사용 된 샘플 코드입니다UIPageViewController 응용 프로그램 - pdf로 채우기

:

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

내가 createContentPages 변경을하지만 똥을하지, 난 생각 정상, 그것은 이미지의 경로를 보여주고있다 (내가 보인다 이미지 시도) ... 쉽게 :

- (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 페이지에 래핑해야합니다.

관련 문제