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);
應用程序崩潰,並且卵石日誌沒有幫助(它說應用程序故障,所以某種段錯誤)。有什麼我失蹤?