更新于2018.10.31
这个bug已经在iOS 12.1中得到修复,祝你有个美好的一天〜
我在新发布的iOS 12 Safari中发现了Array的值状态问题,例如,代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>iOS 12 Safari bugs</title>
<script type="text/javascript">
window.addEventListener("load", function ()
{
let arr = [1, 2, 3, 4, 5];
alert(arr.join());
document.querySelector("button").addEventListener("click", function ()
{
arr.reverse();
});
});
</script>
</head>
<body>
<button>Array.reverse()</button>
<p style="color:red;">test: click button and refresh page, code:</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
刷新页面后,数组的值仍然相反.这是新Safari的错误还是功能?
这是一个演示页面.尝试在iOS 12 Safari中使用它:https: //abelyao.github.io/others/ios12-safari-bug.html
我已经更新我的iPhone 6加至10的iOS beta版本,只是发现,在移动Safari浏览器,您可以通过双击放大任何网页或捏忽略了user-scalable=no
在meta标签代码.我不知道这是一个错误或功能.如果它被视为一项功能,我们如何禁用视口缩放iOS 10 Safari?
在iOS 11/12发布,iOS 11和iOS 12 safari上更新仍然不尊重user-scalable=no
元标记.
如果我有使用SwiftUI制作的应用程序,那么它可以在iOS 13以下的iOS上运行吗?
我正面临这个错误,我完成了对此的研究.
我总结结果,我需要一个文件来支持设备10.2(14C92)
请分享该文件.
去:
我需要那个文件夹.
谢谢.
如何实现垂直平面检测(即墙壁)?
let configuration = ARWorldTrackingSessionConfiguration()
configuration.planeDetection = .horizontal //TODO
Run Code Online (Sandbox Code Playgroud) 我正在开发iOS应用程序.它在Xcode 9.4.1中运行良好,但是当我在Xcode 10中构建它时,它会给我以下错误:
:-1: Multiple commands produce '/Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Dev-iphonesimulator/TLYShyNavBar/TLYShyNavBar.framework/Info.plist':
1) Target 'TLYShyNavBar' has copy command from '/Users/.../Desktop/Workspace/iOS/.../Pods/TLYShyNavBar/TLYShyNavBar/Info.plist' to '/Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Dev-iphonesimulator/TLYShyNavBar/TLYShyNavBar.framework/Info.plist'
2) Target 'TLYShyNavBar' has process command with input '/Users/.../Desktop/Workspace/iOS/.../Pods/Target Support Files/TLYShyNavBar/Info.plist'
Run Code Online (Sandbox Code Playgroud)
我尝试了这篇文章的解决方案,但它们没有用.任何提供的帮助表示赞赏.谢谢!
此iPhone 8(型号A1863,A1905,A1906,A1907)运行的是iOS 12.0(16A5308e),此版本的Xcode可能不支持此功能.(版本9.4.1(9F2000))
像这样的代码
collectionLayout.estimatedItemSize = CGSize(width: 50, height: 25)
collectionLayout.itemSize = UICollectionViewFlowLayoutAutomaticSize
collectionLayout.minimumInteritemSpacing = 10
for _ in 0 ..< 1000 {
let length = Int(arc4random() % 8)
let string = randomKeyByBitLength(length)
array.append(string!)
}
collectionView.reloadData()
Run Code Online (Sandbox Code Playgroud)
细胞限制:
当我在iOS 12上运行它时,它是不同的.左模拟器是iOS 11,右边是iOS 12:
但是,当我滚动它时,细胞的帧将是正常的.
我试图将照片上传到Firebase,但它给了我这个错误.它在Xcode 10之前工作.我收到此错误:
'UIImageJPEGRepresentation'已被实例方法'UIImage.jpegData(compressionQuality :)'取代
我不知道如何使用这个功能.
import UIKit
import Firebase
class SignUpViewController:UIViewController {
@IBOutlet weak var profileImageView: UIImageView!
@IBOutlet weak var tapToChangeProfileButton: UIButton!
var continueButton:RoundedWhiteButton!
var imagePicker:UIImagePickerController!
override func viewDidLoad() {
super.viewDidLoad()
continueButton.addTarget(self, action: #selector(handleSignUp), for:
.touchUpInside)
let imageTap = UITapGestureRecognizer(target: self, action:
#selector(openImagePicker))
profileImageView.isUserInteractionEnabled = true
profileImageView.addGestureRecognizer(imageTap)
profileImageView.layer.cornerRadius = profileImageView.bounds.height / 2
profileImageView.clipsToBounds = true
imagePicker = UIImagePickerController()
imagePicker.allowsEditing = true
imagePicker.sourceType = .photoLibrary
imagePicker.delegate = self
}
func uploadProfileImage(_ image:UIImage, completion: @escaping ((_ url:URL?)->())) {
guard let uid = …
Run Code Online (Sandbox Code Playgroud)