我使用Bootstrap创建了一个tile.在瓷砖内部,靠近底部我想要瓷砖的三个按钮(开始,中间和结束).
我制作了开始和结束按钮但是使用了两个div标签pull-left和pull-right类.现在我想要的是放置中间按钮.
这是我的代码的一部分和截图:
<div class="col-lg-12">
<div class="pull-left">
<button class="btn btn-primary btn-sx" type="button">Confirm</button>
</div>
<!-- I want another button here, center to the tile-->
<div class="pull-right">
<button class="btn btn-primary btn-xs pull-right" type="button">Decline</button>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) 目前我使用的是Apple发布的稳定版本macOS 10.14.5和Xcode 10.2.1。我想为我的 Mac 安装新的 macOS Catalina 10.15 beta 和 Xcode 11 beta。但我想保留两个 Xcode 版本(Xcode 10.2.1 和 Xcode 11 beta),因为我每周都会对我的应用程序进行更新,这些应用程序目前位于 App Store 中。
我正在尝试将字符串转换为日期,并再次将日期转换为字符串.
我试过下面,但它给了我一个零值错误
let string = "2017-07-11T06:52:15.948Z"
let dateFormatter = DateFormatter()
let tempLocale = dateFormatter.locale // save locale temporarily
dateFormatter.locale = Locale(identifier: "en_US_POSIX") // set locale to reliable US_POSIX
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
let date = dateFormatter.date(from: string)!
dateFormatter.dateFormat = "dd-MM-yyyy HH:mm:ss"
dateFormatter.locale = tempLocale // reset the locale
let dateString = dateFormatter.string(from: date)
print("EXACT_DATE : \(dateString)")
Run Code Online (Sandbox Code Playgroud)
然后我尝试只使用没有时间的日期,分隔下面的确切字符串
let string = "2017-07-11T06:52:15.948Z"
let dateonly = (string.components(separatedBy: "T"))[0]
let dateformatter = DateFormatter()
dateformatter.dateFormat = "yyyy-mm-dd"
dateformatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") as Locale!
let date …Run Code Online (Sandbox Code Playgroud) 这就是我生成公钥/私钥对的方式
var statusCode: OSStatus
var publicKey: SecKey?
var privateKey: SecKey?
let publicKeyAttribute: [NSObject : NSObject] = [kSecAttrIsPermanent: true as NSObject, kSecAttrApplicationTag: "publictag".data(using: String.Encoding.utf8)! as NSObject]
let privateKeyAtrribute: [NSObject: NSObject] = [kSecAttrIsPermanent: true as NSObject, kSecAttrApplicationTag: "privatetag".data(using: String.Encoding.utf8)! as NSObject]
var keyPairAttr = [NSObject: Any]()
keyPairAttr[kSecAttrType] = kSecAttrKeyTypeRSA
keyPairAttr[kSecAttrKeySizeInBits] = 2048
keyPairAttr[kSecReturnData] = true
keyPairAttr[kSecPublicKeyAttrs] = publicKeyAttribute
keyPairAttr[kSecPrivateKeyAttrs] = privateKeyAtrribute
statusCode = SecKeyGeneratePair(keyPairAttr as CFDictionary, &publicKey, &privateKey)
Run Code Online (Sandbox Code Playgroud)
这会生成如下所示的密钥对,
公钥:
Optional(<SecKeyRef algorithm id: 1, key type: RSAPublicKey, version: 4, block size: 2048 …Run Code Online (Sandbox Code Playgroud)