Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen goes blank when I set view to panoramaView #32

Closed
OxenBoxen opened this issue Feb 17, 2016 · 1 comment
Closed

Screen goes blank when I set view to panoramaView #32

OxenBoxen opened this issue Feb 17, 2016 · 1 comment

Comments

@OxenBoxen
Copy link

Hey ya'll!

I'm trying to use this library for a feature of an app I'm currently working on - but I'm running into an issue. Whenever I actually load up Panorama and set it to my viewController's view, the screen goes completely blank (white).

I am calling this setup method in viewDidLoad:

  • (void)setup {
    self.panoramaView = [[PanoramaView alloc] init];

    [self.panoramaView setImage:@"360_background.png"];
    [self.panoramaView setOrientToDevice:YES];
    [self.panoramaView setTouchToPan:NO];
    [self.panoramaView setPinchToZoom:YES];
    [self.panoramaView setShowTouches:NO];

    [self setView:self.panoramaView];
    }

I have the image in my images.xcassets folder in xcode, and the name matches. (not getting 'missing image' nslog thrown). The image size is 4096 x 2048.

I also have this method in my implementation:

  • (void)glkView:(GLKView *)view drawInRect:(CGRect)rect {
    [self.panoramaView draw];
    }

And I am indeed subclassing GLKViewController. Anyone run into similar issues? I'm using cocoapods, but I doubt that is an issue.

@OxenBoxen
Copy link
Author

Hmm, interesting. When I placed the image in images.xcassets folder, panorama could not find the image. It wasn't until I placed them on their own in the xcode folder structure was I then able to load up the image correctly. We should probably add that note in the readme!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant