简体   繁体   English

如何使用layer_get_unobstructed_bounds?

[英]How do i use layer_get_unobstructed_bounds?

i want to implement layer_get_unobstructed_bounds() but it doesn't work for me. 我想实现layer_get_unobstructed_bounds()但对我来说不起作用。
When i run the app it prints every second -50 and QuickView doesn't change that. 当我运行该应用程序时,它每秒打印-50而QuickView不会更改它。 What am i doing wrong? 我究竟做错了什么? In conclusion: layer_get_unobstructed_bounds() doesn't change at all. 结论: layer_get_unobstructed_bounds()完全没有变化。

Here is my code: https://github.com/WuerfelDev/LIFT/tree/test 这是我的代码: https : //github.com/WuerfelDev/LIFT/tree/test
The printf is at line 33 printf在第33行

Thank you! 谢谢!

My fault was that i used origin.y instead size.h . 我的错是我使用origin.y而不是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 . 我以为它会返回QuickViews边界,但是实际上它代表的是未显示QuickView的屏幕部分的边界。


Big thanks to @PebbleDev on twitter: 非常感谢Twitter上的@PebbleDev:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM