Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Change code to a code block
Source Link
gulchrider
  • 4.3k
  • 3
  • 27
  • 16

My solution would probably be considered kind of bogus but I had a similar situation as mayoneez (I wanted to switch views in response to a gesture in an EAGLView), and I got the EAGL's view controller this way:

EAGLViewController vc = ((EAGLAppDelegate)[[UIApplication sharedApplication] delegate]).viewController;

EAGLViewController *vc = ((EAGLAppDelegate*)[[UIApplication sharedApplication] delegate]).viewController; 

My solution would probably be considered kind of bogus but I had a similar situation as mayoneez (I wanted to switch views in response to a gesture in an EAGLView), and I got the EAGL's view controller this way:

EAGLViewController vc = ((EAGLAppDelegate)[[UIApplication sharedApplication] delegate]).viewController;

My solution would probably be considered kind of bogus but I had a similar situation as mayoneez (I wanted to switch views in response to a gesture in an EAGLView), and I got the EAGL's view controller this way:

EAGLViewController *vc = ((EAGLAppDelegate*)[[UIApplication sharedApplication] delegate]).viewController; 
deleted 39 characters in body
Source Link
gulchrider
  • 4.3k
  • 3
  • 27
  • 16

ItMy solution would probably be considered kind of bogus (hey, I just started looking at iPhone in Dec!) but I had a similar situation as mayoneez (I wanted to switch views in response to a gesture in an EAGLView), and I got the EAGL's view controller this way:

EAGLViewController vc = ((EAGLAppDelegate)[[UIApplication sharedApplication] delegate]).viewController;

It would probably be considered kind of bogus (hey, I just started looking at iPhone in Dec!) but I had a similar situation as mayoneez (I wanted to switch views in response to a gesture in an EAGLView), and I got the EAGL's view controller this way:

EAGLViewController vc = ((EAGLAppDelegate)[[UIApplication sharedApplication] delegate]).viewController;

My solution would probably be considered kind of bogus but I had a similar situation as mayoneez (I wanted to switch views in response to a gesture in an EAGLView), and I got the EAGL's view controller this way:

EAGLViewController vc = ((EAGLAppDelegate)[[UIApplication sharedApplication] delegate]).viewController;

Source Link
gulchrider
  • 4.3k
  • 3
  • 27
  • 16

It would probably be considered kind of bogus (hey, I just started looking at iPhone in Dec!) but I had a similar situation as mayoneez (I wanted to switch views in response to a gesture in an EAGLView), and I got the EAGL's view controller this way:

EAGLViewController vc = ((EAGLAppDelegate)[[UIApplication sharedApplication] delegate]).viewController;