gpt4 book ai didi

ios - ios 中的 UIUserInterfaceIdiomPad

转载 作者:行者123 更新时间:2023-11-29 05:43:46 30 4
gpt4 key购买 nike

ios中为什么使用UIUserInterfaceIdiomPad?

在我的 mac book pro ipad 刺​​激器中

  BOOL isIPad2 = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad &&
[UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]);

最佳答案

UIUserInterfaceIdiomPad 用于了解当前设备是什么。来自苹果文档

For universal applications, you can use this property to tailor the behavior of your application for a specific type of device. For example, iPhone and iPad devices have different screen sizes, so you might want to create different views and controls based on the type of the current device.

关于ios - ios 中的 UIUserInterfaceIdiomPad,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56336232/

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