- 博客(11)
- 资源 (20)
- 收藏
- 关注
原创 swift 获取年月日 swift 获取年月日时分秒(每一个单独获取) 和获取yy-mm-dd格式
var calendar:Calendar = Calendar.current; var now = Date(); var year = calendar.component(.year, from: now); var month = calendar.component(.month, from: now); var...
2019-06-29 16:07:29 4909
原创 swift获取当前时间戳 最新
秒级别 var dat:Date = Date.init(timeIntervalSinceNow: 0) var a:TimeInterval = dat.timeIntervalSince1970; var timep = UInt64(a)毫秒级别 var a: TimeInterval = Date....
2019-06-29 14:17:09 2111
原创 swift 评分对话框UIAlertController
let alertController =UIAlertController(title:nil,message:"评分", preferredStyle: .alert) letokAction =UIAlertAction(title:"现在评分", style: .destructive, handler: { ...
2019-06-28 10:00:59 304
原创 swift 扫描二维码 稳定快速准确各大APP均需要
// ScanViewController.swift // Created by sts on 2019/6/20. import UIKitimport AVFoundationclass ScanViewController: UIViewController,AVCaptureMetadataOutputObjectsDelegate { //...
2019-06-21 15:53:50 2108 10
原创 swift UIActionSheet
var sheet = UIActionSheet(title: nil, delegate: self, cancelButtonTitle: nil, destructiveButtonTitle: nil) sheet.addButton(withTitle: "按键学习") sheet.addButton(withTitle: "扫码学...
2019-06-20 15:37:47 473
原创 swift Int数组转Data UInt8数组转Data Data转UInt8数组
var mBytes:[UInt8] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var data:Data = Data(bytes: mBytes, count: mBytes.count);varbytes = [UInt8](data)print(bytes)
2019-06-19 17:22:58 5713
原创 swift5 Notification
创建通知中心设置监听方法设置通知的名字 NotificationCenter.default.addObserver(self, selector: #selector(refuslt), name: NSNotification.Name(rawValue:"notification"), object: nil)实现通知监听方法@objc func refuslt(...
2019-06-18 17:08:22 2404
原创 swift base64编码 解码
/*** 编码*/func base64Encoding(plainString:String)->String{ var plainData = plainString.data(using: String.Encoding.utf8)var base64String ...
2019-06-18 14:38:53 5630 1
原创 swift UIAlertController对话框 swift5
let alertController = UIAlertController(title: "系统提示", message: "请打开手机蓝牙", preferredStyle: .alert) let cancelAction = UIAlertAction(t...
2019-06-17 08:58:07 937
原创 swift https get请求
let url = URL(string: "https://api.gizwits.com/app/bindings")! let session = URLSession.shared var request = URLRequest(url:url) request.addValue("application/json", forHTTP...
2019-06-15 13:58:03 1151
原创 swift 字符串String转Int 16进制字符串String转Int Int转16进制字符串 hexString to Int
swift 字符串String转Int 16进制字符串String转Intvar hexi:UInt = UInt(hexS, radix: 16)let n = 14var st = String(format:"%02X", n)st += " is the hexadecimal representation of \(n)"print(st)...
2019-06-13 16:27:55 3949
YUVViewer20191030.rar
2019-10-30
RadioGroupActivity
2011-07-19
picture3D 相册
2011-07-19
ActivityGroup的使用
2011-07-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人