1
我想填充此应用程序,但使用pdf而不是字符串。我能怎么做 ?我想这是在函数 - (无效)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];
}