我的应用程序已经启动并运行。一切正常。但我注意到专门针对 iOS 16+ 设备的相机屏幕有不同的标题。
我有这个简单的代码,我们用于相机没有改变也没有为选择器控制器进行扩展。
let imagePicker = UIImagePickerController()
imagePicker.delegate = self
imagePicker.modalPresentationStyle = .overCurrentContext
let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
alert.addAction(UIAlertAction(title: NSLocalizedString("Take photo".localized, comment: ""), style: .default, handler: { _ in
#if targetEnvironment(simulator)
#else
imagePicker.sourceType = .camera
imagePicker.cameraCaptureMode = .photo
imagePicker.cameraDevice = .rear
fbEvents.setButtonClickEvent(title: "ChangeProfileTakePhotoClickEvent", viewController: self)
self.present(imagePicker, animated: true, completion: nil)
#endif
}))
有人可以帮忙吗?
据我了解,您的应用程序具有多语言支持。
NSLocalizedString("Take photo".localized, comment: "")
在本地化文件中,为每个需要本地化的字符串常量定义一个key和一个value。
"Take photo" = "Take photo";