-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
部分iPad上apple pencil不能在画布上使用,请问有其他朋友遇到过吗? #140
Comments
Use it for check: //
// UIDevice+Ex.swift
// PrescriptionReception
//
// Created by Le Xuan Quynh on 21/09/2023.
//
import UIKit
// supportPencil
extension UIDevice {
/*
You can use Apple Pencil (2nd generation) with these iPad models:
iPad mini (6th generation)
iPad Air (4th generation and later)
iPad Pro 12.9-inch (3rd generation and later)
iPad Pro 11-inch (1st generation and later)
You can use Apple Pencil (1st generation) with these iPad models:
iPad mini (5th generation)
iPad (6th, 7th, 8th, and 9th generation)
iPad (10th generation)*
iPad Air (3rd generation)
iPad Pro 12.9-inch (1st and 2nd generation)
iPad Pro 10.5-inch
iPad Pro 9.7-inch
*/
var isSupportPencil: Bool {
// if simulator always return false
#if targetEnvironment(simulator)
return false
#endif
// return self.modelName == "iPad mini (6th generation)"
// || self.modelName == "iPad Air (4th generation)"
// || self.modelName == "iPad Pro 12.9-inch (3rd generation)"
// || self.modelName == "iPad Pro 11-inch (1st generation)"
// || self.modelName == "iPad mini (5th generation)"
// || self.modelName == "iPad (6th generation)"
// || self.modelName == "iPad (7th generation)"
// || self.modelName == "iPad (8th generation)"
// || self.modelName == "iPad (9th generation)"
// || self.modelName == "iPad Air (3rd generation)"
// || self.modelName == "iPad Pro 12.9-inch (1st generation)"
// || self.modelName == "iPad Pro 12.9-inch (2nd generation)"
// || self.modelName == "iPad Pro 10.5-inch"
// || self.modelName == "iPad Pro 9.7-inch"
// using contains
return ["iPad mini (6th generation)",
"iPad Air (4th generation)",
"iPad Pro 12.9-inch (3rd generation)",
"iPad Pro 11-inch (1st generation)",
"iPad mini (5th generation)",
"iPad (6th generation)",
"iPad (7th generation)",
"iPad (8th generation)",
"iPad (9th generation)",
"iPad Air (3rd generation)",
"iPad Pro 12.9-inch (1st generation)",
"iPad Pro 12.9-inch (2nd generation)",
"iPad Pro 10.5-inch",
"iPad Pro 9.7-inch"].contains(self.modelName)
}
var modelName: String {
return UIDevice.current.name
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
部分iPad上apple pencil不能在画布上使用,请问有其他朋友遇到过吗?
我自己无法复现,但是有部分线上用户反馈,iPad上apple pencil不能在画布上使用,画布以外的位置都正常。
The text was updated successfully, but these errors were encountered: