Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Graham Connolly
Graham Connolly
25,475 Points

What is actually happening here? `Snapshotting a view that has not been rendered results in an empty snapshot. `

What is actually happening that causes this warning? Im struggle to understand this.

Snapshotting a view that has not been rendered results in an empty snapshot. I pressed the hardware menu button and this warning was printed.

Actually, is it a warning? Or can it be ignored?

I am using Xcode6 and iOS8. There was no problem in iOS7.

4 Answers

jean-marie castellucci
jean-marie castellucci
4,954 Points

Happened usually when a view appear with animation while animation from a previous view is not completed.

Graham Connolly
Graham Connolly
25,475 Points

Thanks Jean-Marie.

Is there a solution for this?

jean-marie castellucci
jean-marie castellucci
4,954 Points

Could you provide more details about your code and what it s going on in your code when you press the button ? What do you call the "menu button" ? is this the "home button " ?

What You should try is to put a delay for the second view to appear.

Graham Connolly
Graham Connolly
25,475 Points

Yes the menu button is the hardware circular button on the device, not within the app.

If I launch my app and press the hardware menu button on the device, there is no message, but if I launch the app, and then press it again it appears.

I am using a library called RESideMenu which provides a side menu. My root view controller appears first, there is a button to segue to the second screen.

The message only appears on the seconds screen when I do the following. 1) Launch app 2) Close app 3) launch app 4) close app

Produces console message

jean-marie castellucci
jean-marie castellucci
4,954 Points

I think the side menu has an animation that interact with the appearance of the second screen or something like that. Did you tried to put a delay ?

Graham Connolly
Graham Connolly
25,475 Points

Thanks for the reply again. Where would you suggest I place the delay? When performing the segue to the second view controller?

I cant really add a delay to the hardware menu button on the device.