Search code examples
cpebble-watchcloudpebble

How do i use layer_get_unobstructed_bounds?


i want to implement layer_get_unobstructed_bounds() but it doesn't work for me.
When i run the app it prints every second -50 and QuickView doesn't change that. What am i doing wrong? In conclusion: layer_get_unobstructed_bounds() doesn't change at all.

Here is my code: https://github.com/WuerfelDev/LIFT/tree/test
The printf is at line 33

Thank you!


Solution

  • My fault was that i used origin.y instead size.h.
    I thought it would return the QuickViews bounds, but instead it actually represents the bounds of the part of the screen where the QuickView is not shown.


    Big thanks to @PebbleDev on twitter:

    https://twitter.com/PebbleDev/status/771372057590390784