我是iOS的新手.我的Xcode版本是7.2.1,我正在尝试使用Swift在iOS9上运行.我的问题是我对如何创建Launch Screen Image非常困惑.我发现有很多方法可以为不同版本的iOS创建启动屏幕图像.有人可以向我解释如何设置我的发布图像吗?
我遵循的过程是:
我想知道的一件事是,我需要把一个UIImageView放入我的Launchscreen.storyboard?是不是自动从Images.xcassets文件夹中检索到了?
我为登录屏幕创建了不同大小的背景图像.
我指的是苹果链接https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen/
但是我没有使用Launch Screen,我只是想在Login屏幕上添加背景.
我想知道哪个是1x,2x和3x?
另一个问题是当我创建图像集时,应该将图像的大小拖到哪个位置.我不知道那个.或者我们只需要3张图片(通用行)?
那么,景观图像怎么样?我应该把它放在哪里?

我想检测测试设备是iPod还是iPhone。现在,我正在使用此代码。
if (UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.pad)
{ debugPrint("ipad show")
}
else
{
debugPrint("ipod show")
}
Run Code Online (Sandbox Code Playgroud)
当我使用iPhone 7进行测试时,它显示的是iPod。因此,我想检测它是iPod还是iPhone。
我不想安装任何其他吊舱来实现此目的。
我想用简单而简短的代码来实现。
谁能帮我吗?
我想在警报消息标题中添加共享图像而不是标题文本.
如何使用swift 3实现这一点?
let alertController = UIAlertController(title: "Share Movie", message: "Share this movie!", preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: "Share", style: UIAlertActionStyle.default, handler: nil))
Run Code Online (Sandbox Code Playgroud) swift ×5
ios ×4
swift3 ×2
device ×1
expand ×1
image-size ×1
ios9 ×1
iphone ×1
ipod ×1
launchimage ×1
separator ×1
tablecell ×1
uialertview ×1
uiimage ×1
uilabel ×1
uitableview ×1
uitextfield ×1
uitextview ×1