0
我在Pebble上实现自定义动画时遇到了麻烦。这里没有任何真正的在线教程跟着,我能找到的唯一的事情是官方的卵石之一:https://developer.pebble.com/guides/pebble-apps/display-and-animations/property-animations/#writing-custom-animation-types卵石:如何创建自定义动画?
这是我的项目的代码部分:
static Animation *large_pin_animation;
static void anim_update_handler(Animation *animation, const AnimationProgress progress) {
APP_LOG(APP_LOG_LEVEL_INFO, "%d", (int)progress);
}
static void window_load(Window *window) {
large_pin_animation = animation_create();
animation_set_duration(large_pin_animation, 1000);
animation_set_delay(large_pin_animation, 0);
AnimationImplementation anim_implementation = (AnimationImplementation) {
.update = anim_update_handler
};
animation_set_implementation(large_pin_animation, &anim_implementation);
}
当我打电话animation_schedule(large_pin_animation);
应用程序崩溃,并且卵石日志没有帮助(它说应用程序故障,所以某种段错误)。有什么我失踪?