我正在尝试决定是否应该在我的应用程序中实现横向模式。是否有分析软件会告诉我用户是否尝试以横向模式查看我的应用程序?或者我应该给自己写一些方法吗?
答案 0 :(得分:2)
很难判断,无论用户是否尝试进入横向模式,都会对所有方向进行shouldAutorotateToInterfaceOrientation:
调用,并且只对支持的方向进行willRotate / didRotate回调。您可以做的是记录
[[UIDevice currentDevice] orientation];
在每个shouldAutorotateToInterfaceOrientation上。或者注册UIDeviceOrientationDidChangeNotification
通知。无论视图控制器的方向如何,都会返回UIDeviceOrientation。请注意,这与UIViewControllers用于interfaceOrientation属性的UIInterfaceOrientation值不同。
typedef enum {
UIDeviceOrientationUnknown,
UIDeviceOrientationPortrait,
UIDeviceOrientationPortraitUpsideDown,
UIDeviceOrientationLandscapeLeft,
UIDeviceOrientationLandscapeRight,
UIDeviceOrientationFaceUp,
UIDeviceOrientationFaceDown
} UIDeviceOrientation;
虽然两者有关:
typedef enum {
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
} UIInterfaceOrientation;
答案 1 :(得分:2)
您可以使用heatma.ps SDK查看应用程序每个屏幕的统计信息。这是自动的,因此您无需实施方向支持即可找到答案。
答案 2 :(得分:0)
您可以使用Google Analytics用户计时来衡量用户在特定方向上花费的时间间隔。您可以阅读有关跟踪本机ios应用的用户时序的信息 https://developers.google.com/analytics/devguides/collection/ios/v2/usertimings