gpt4 book ai didi

ios - willAnimateRotationToInterfaceOrientation 未从trigger.io 模块监听器调用

转载 作者:行者123 更新时间:2023-11-29 03:25:29 25 4
gpt4 key购买 nike

按照此处的文档进行操作:

https://trigger.io/docs/current/api/native_modules/native_events.html#ios

该引用:

https://trigger.io/docs/current/api/native_modules/native/ios/Classes/ForgeEventListener.html#//api/name/willRotateToInterfaceOrientation:duration :

我尝试实现 willRotateToInterfaceOrientation 我在方法和条件中设置了调试断点,但没有触发任何断点。在 iOS7 和 iOS6 模拟器中对此进行测试我看到一些帖子说较新版本的 iOS 不再支持 willRotateToInterfaceOrientation。我错过了什么?

//mymodule_EventListener.m

#import "mymodule_EventListener.h"

@implementation mymodule_EventListener

//
// Here you can implement event listeners.
// These are functions which will get called when certain native events happen.
//

+ (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInt duration:(NSTimeInterval)duration {
if (UIInterfaceOrientationIsLandscape(toInt)) {
[[ForgeApp sharedApp] event:@"mymodule.orientation_is_landscape" withParam:nil];
} else {
[[ForgeApp sharedApp] event:@"mymodule.orientation_is_portriat" withParam:nil];

}
}


@end

最佳答案

我将签名更改为:它开始工作了吗?什么?

+ (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{

关于ios - willAnimateRotationToInterfaceOrientation 未从trigger.io 模块监听器调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20509950/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com