-1
前一頁:在iphone中加載頁面時出錯?
MainController *bookview=[[MainController alloc]init];
bookview.bookString=booksStr;
[self.navigationController pushViewController:bookview animated:YES];
-transform到下一個視圖頁面: -
- (NSInteger) numberOfPagesForPageFlipper:(AFKPageFlipper *)pageFlipper {
return self.view.bounds.size.width > self.view.bounds.size.height ? ceil((float) CGPDFDocumentGetNumberOfPages(pdfDocument)/2) : CGPDFDocumentGetNumberOfPages(pdfDocument);
}
- (UIView *) viewForPage:(NSInteger) page inFlipper:(AFKPageFlipper *) pageFlipper {
PDFRendererView *result = [[[PDFRendererView alloc] initWithFrame:pageFlipper.bounds] autorelease];
result.pdfDocument = pdfDocument;
result.pageNumber = page;
return result;
}
-(void)viewDidLoad
{
self.title=bookString;
NSLog(@"the bookstring value is %@",bookString);
}
#pragma mark -
#pragma mark View management
- (void) loadView {
[super loadView];
self.view.autoresizesSubviews = YES;
self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
flipper = [[[AFKPageFlipper alloc] initWithFrame:self.view.bounds] autorelease];
flipper.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
flipper.dataSource = self;
NSLog(@"loadview loaded successfully %@",bookString);
[self.view addSubview:flipper];
}
#pragma mark -
#pragma mark Initialization and memory management
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return YES;
}
- (id) init {
if ((self = [super init])) {
pdfDocument = CGPDFDocumentCreateWithURL((CFURLRef) [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"AppleScript Language Guide" ofType:@"pdf"]]);
NSLog(@"this is maincontroller");
[self loadView];
}
return self;
}
- (void)dealloc {
CGPDFDocumentRelease(pdfDocument);
[super dealloc];
}
,我不能夠轉移字符串值,並
- 改變屬性的變換 - 不透明只有圖層,將不起作用
頁面不轉移到下一個視圖
任何人都可以幫忙嗎?
presentviewcontroller工作正常,但值不是在所有從oneview解析到另一個 – Marios
或你會使用appdelegate方法 – akk