嘿,我试图获取网址的标题信息,
当我使用协议http它工作正常,但当我使用https它不工作
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
Warning: get_headers(): Failed to enable crypto in
Warning: get_headers(https://200.35.78.130/): failed to open stream: operation failed in /
Run Code Online (Sandbox Code Playgroud)
这是我的代码
print_r(get_headers("https://200.35.78.130/", 1));
Run Code Online (Sandbox Code Playgroud) 在我问这个之前,我尝试了其他解决方案,但没有奏效
这是我的代码
override func viewDidLoad() {
super.viewDidLoad()
let tapGesture = UITapGestureRecognizer(target: self, action: "didTouchBoard:")
view.addGestureRecognizer(tapGesture)
tapGesture.cancelsTouchesInView = true
}
Run Code Online (Sandbox Code Playgroud)
当我点击任何地方时,它会隐藏键盘(如果存在),但如果我点击 tableviewcell 或 collectionviewcell,它不会点击
我试试这个 tapGesture.cancelsTouchesInView ,但不起作用
我只是将Xcode更新为7.3,现在我收到此警告:
'var'参数已弃用,将在Swift 3中删除
我需要在这个函数中使用var:
class func gcdForPair(var a: Int?, var _ b: Int?) -> Int {
// Check if one of them is nil
if b == nil || a == nil {
if b != nil {
return b!
} else if a != nil {
return a!
} else {
return 0
}
}
// Swap for modulo
if a < b {
let c = a
a = b
b = c
}
// Get greatest common …
Run Code Online (Sandbox Code Playgroud)