应用程序在改变方向时挂起

发布于 2024-10-09 07:05:38 字数 201 浏览 0 评论 0原文

我知道这将是一个模糊的问题,但请考虑一下...... 我正在ipad上开发一个图书阅读器,它有很多功能,如突出显示、笔记等,所有这些功能都运行良好。但只有当我在实现任何功能后尝试旋转设备时,问题才会出现。更改 itz 方向后,该应用程序会被击中(或挂起)。

谁能告诉我为什么应用程序通常会挂起???请考虑一下。您的意见将帮助我走很长的路......

谢谢

i know this is going to be a vague question, but please give a thought to this...
I am developing a book reader on ipad and it has many functionalities like highlight, notes etc. and all these functions are woking well. But the problem comes only when i try to rotate my device after implementing any function.. The app is geting struck(or hanged) after changing itz orientation....

Can anyone tell me why a app usually gets hanged???? Give a thought to this please. Your inputs will help me go a long way.....

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

俯瞰星空 2024-10-16 07:05:38

问题可能出在您的控制框架设置上。

如果您的应用程序仅支持纵向模式,则意味着代码如下,

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

否则

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return YES;
}

并相应地更改控制框架。

The problem might be with your control frame settings.

If your application support portrait mode alone means code as follows,

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

else

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return YES;
}

and change the control frame accordingly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文