I have some code that's attempting to create some PDF's in the background, and it worked great until I upgraded to xCode 13. Now it seems as though it's having issues initializing some code, and I'm wondering if anyone can help me out.
NewCustomPageViewController *pvc = (NewCustomPageViewController*)self.parentViewController.parentViewController; //loads object fine
for (UIViewController *vc in pvc.pages) { //loads object fine
UIView *mainView = [[[vc.view.subviews objectAtIndex:0] subviews] objectAtIndex:0]; //<- It's crashing here
}
That's the code that's throwing the error: Thread 23: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
I don't know what to do, and it doesn't even seem to be getting to the loaded UIViewController that it's attempting (The vc.view.subviews object) as from within xCode, it's showing that as loaded, but it's just crashing.
Is there something else I should be doing? This has worked beautifully before in the old xCode (I believe xCode 9 or 11? I forget)
Thanks in advance!!
NewCustomPageViewController *pvc = (NewCustomPageViewController*)self.parentViewController.parentViewController; //loads object fine
for (UIViewController *vc in pvc.pages) { //loads object fine
UIView *mainView = [[[vc.view.subviews objectAtIndex:0] subviews] objectAtIndex:0]; //<- It's crashing here
}
That's the code that's throwing the error: Thread 23: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
I don't know what to do, and it doesn't even seem to be getting to the loaded UIViewController that it's attempting (The vc.view.subviews object) as from within xCode, it's showing that as loaded, but it's just crashing.
Is there something else I should be doing? This has worked beautifully before in the old xCode (I believe xCode 9 or 11? I forget)
Thanks in advance!!