上一页 1 2 3 4 5 6 ··· 42 下一页
摘要: // MARK: - TextView 高度自适应 final class BaseAutoResizeTextView: UITextView { var maxHeight = CGFloat.greatestFiniteMagnitude override var contentSize: C 阅读全文
posted @ 2025-04-08 08:46 懂事长qingzZ 阅读(31) 评论(0) 推荐(0)
摘要: // MARK: 1.10、退出app(类似点击home键盘)退到后台 /// 退出app(类似点击home键盘) public static func exitApp() { DispatchQueue.main.async { UIApplication.shared.perform(#sele 阅读全文
posted @ 2025-04-08 08:26 懂事长qingzZ 阅读(47) 评论(0) 推荐(0)
摘要: 注意点 label的文字要自己计算高度,不然不会换行显示 self.nopairHeaderView.layoutIfNeeded() let headerHeight = self.nopairHeaderView.systemLayoutSizeFitting(UIView.layoutFitt 阅读全文
posted @ 2025-03-28 11:10 懂事长qingzZ 阅读(40) 评论(0) 推荐(0)
摘要: private func openBluetoothSettings() { let bluetoothURL = URL(string: "App-Prefs:Bluetooth")! let settingsURL = URL(string: UIApplication.openSettings 阅读全文
posted @ 2025-03-28 11:05 懂事长qingzZ 阅读(59) 评论(0) 推荐(0)
摘要: pod 'AttributedString' - AttributedString (3.4.1) subTitleLabel.attributed.text = """ \("蓝牙连接失败,点击 ", .foreground(UIColor.gray))\("查看教程", .link("查看教程" 阅读全文
posted @ 2025-03-26 17:14 懂事长qingzZ 阅读(150) 评论(0) 推荐(0)
摘要: if 左边 ~= 右边逻辑 { } 表示右边逻辑在左边的逻辑范围内 let task = URLSession.shared.dataTask(with: URL(string: "https://google.com")!) { (data,response, error) in guardlet 阅读全文
posted @ 2025-03-21 16:12 懂事长qingzZ 阅读(8) 评论(0) 推荐(0)
摘要: OC 使用swift 1.swift方法需要关键字 @objcMembers swift @objcMembers class MyClass: NSObject { public var myProperty: String = "Hello" public func myMethod() { p 阅读全文
posted @ 2025-03-18 17:23 懂事长qingzZ 阅读(32) 评论(0) 推荐(0)
摘要: import CoreMotion ///获取设备旋转角度 class YDMotionManager { private let motionManager = CMMotionManager() // 添加一个回调来传递计算出的角度 func getAngle(completion: ((_ a 阅读全文
posted @ 2025-03-13 13:57 懂事长qingzZ 阅读(45) 评论(0) 推荐(0)
摘要: CustomStringConvertible Equatable 阅读全文
posted @ 2025-02-20 11:03 懂事长qingzZ 阅读(5) 评论(0) 推荐(0)
摘要: 自定义MAAnnotationView iOS 高德SDK Swift自定义地图点标记样式 https://izumi.pub/iOS/iOS-amap-sdk/ 2.点击无反应 override init?(annotation: MAAnnotation?, reuseIdentifier: S 阅读全文
posted @ 2025-02-05 16:34 懂事长qingzZ 阅读(94) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 42 下一页