Hey developers,
Actually, I haven't worked alot with Subclassing.
But I am using this library, Leaves. And I had a question this time too
I hope u can figure this out, cuz at iphonedevsdk they are not answering at all..
So, I have this class called leavesview.h
My PDFViewController subclasses this like this -->
Inside that view, I call a popover like this -->
Which shows from the UIButton ^_-
I load some XML shizzle and stuff in there and load to the directory.
Then inside that popoverview, (UITableView). i have this method -->
So, that gets triggered, but never actually changes it.
but if I do this in my PDFViewController in the viewDidLoad or whatever.
It get's called. so my question was, how is the design pattern in this matter.
the currentPageIndex code goes like this -->
I know it's hard, and I think it's a mather of design pattern errors.
I first' discovered the leavesView in my didSelectRowAtIndex was nil, so i Init that in the viewDidLoad, so it doesn't return nil, so it references to there, but can't figure out why it isn't calling the function (decently).
Any idea's, let me know ^_-
Greets. Noxx
Actually, I haven't worked alot with Subclassing.
But I am using this library, Leaves. And I had a question this time too
I hope u can figure this out, cuz at iphonedevsdk they are not answering at all..
So, I have this class called leavesview.h
My PDFViewController subclasses this like this -->
Code:
@interface PDFExampleViewController : LeavesViewController
Inside that view, I call a popover like this -->
Code:
- (IBAction) showTOC:(id)sender {
NSLog(@"showTOC called");
//IndexViewController *indexViewController = [[IndexViewController alloc] init];
if (![popoverController isPopoverVisible]){
myPopOver = [[MyPopOverView alloc] initWithNibName:@"MyPopOverView" bundle:nil];
popoverController = [[UIPopoverController alloc] initWithContentViewController:myPopOver];
[popoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
} else{
[popoverController dismissPopoverAnimated:YES];
}
}
Which shows from the UIButton ^_-
I load some XML shizzle and stuff in there and load to the directory.
Then inside that popoverview, (UITableView). i have this method -->
Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
//int pageNumber = 3;
NSUInteger pageNumber = 3;
[leavesView setCurrentPageIndex:pageNumber-1];
NSLog(@"didSelect fired");
}
So, that gets triggered, but never actually changes it.
but if I do this in my PDFViewController in the viewDidLoad or whatever.
It get's called. so my question was, how is the design pattern in this matter.
the currentPageIndex code goes like this -->
Code:
- (void) setCurrentPageIndex:(NSUInteger)aCurrentPageIndex {
currentPageIndex = aCurrentPageIndex;
if (self.mode == LeavesViewModeFacingPages && aCurrentPageIndex % 2 != 0) {
currentPageIndex = aCurrentPageIndex + 1;
}
[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue
forKey:kCATransactionDisableActions];
[self getImages];
self.leafEdge = 1.0;
[CATransaction commit];
}
I know it's hard, and I think it's a mather of design pattern errors.
I first' discovered the leavesView in my didSelectRowAtIndex was nil, so i Init that in the viewDidLoad, so it doesn't return nil, so it references to there, but can't figure out why it isn't calling the function (decently).
Any idea's, let me know ^_-
Greets. Noxx