我想在加载时调整笔尖中的窗口/图像的大小

发布于 2024-08-31 11:13:21 字数 153 浏览 1 评论 0原文

我有一个 iPhone 应用程序,正在移植到 iPad 上。我将几个 ViewController 存储在 xib 中,我想在加载它们时调整它们的大小。例如,我的带有选项的启动屏幕是一个可以轻松放大的位图(尽管纵横比不匹配),并且我试图找出在 xib 加载期间可以在哪里调整图像/窗口的大小。

I have an iPhone app that I'm porting to the iPad. I store several of the ViewControllers in xib's that I would like to resize when they're loaded. For example my startup screen with options is a bitmap that can easily scale up (despite the mis-matched aspect ratio) and I'm trying to figure out where I have ability to resize the image/window during xib loading.

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

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

发布评论

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

评论(1

尬尬 2024-09-07 11:13:21

您应该通过“文件 → 使用自动调整大小蒙版创建 iPad 版本”在 Interface Builder 中创建 iPad 版本,而不是在加载时调整笔尖大小。

要在运行时修改加载的视图,请实现 -viewDidLoad 方法 在视图控制器中。

Instead of resizing the nib on load, you should create an iPad version in Interface Builder by "File → Create iPad version Using Autoresize Masks".

To modify the loaded view in run-time, implement the -viewDidLoad method in your view controller.

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