Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
Error Domain=NSCocoaErrorDomain Code=3840 “Invalid value around character 4104.
使用Alamofire发了一个GET请求 出现了如下错误 responseSerializationFailed reason Alamofire AFError ResponseSerializationFailureReason jso
Swift
Code3840
[!] Unable to determine Swift version for the following pods:
问题 Unable to determine Swift version for the following pods contact the author or set the SWIFT VERSION attribute pod in
Swift
CocoaPods
Swift version
纯代码构建Swift工程
有些东西很简单 但是我还是把它记录了下来 使用Storyboard创建一个新的项目后 应用程序从闪屏 到主窗口 再到第一个界面经过的文件分别是 LaunchScreen storyboard gt Main storyboard gt Vi
Swift
swift
swift UITextField 设置leftView不生效
swift 给UITextField 设置了 leftView 但是不显示 设置UITextField的光标输入位置 设置UITextField的leftView 但是没显示 视图层上也没有 let iamgeView UIImageVie
Swift
leftView
UITextView
Binary operator ‘==‘ cannot be applied to operands of type ‘Int‘ and ‘[Int]‘
等号两边数据类型不一致进行比较报错 Binary operator cannot be applied to operands of type Int and Int 这个提示也挺明确 二元运算符 两边不能使用 Int 和 Int 写代码时
Swift
Swift 之 JSONEncoder 和 JSONDecoder
Swift 之 JSONEncoder 和 JSONDecoder 摘自官方文档 A type that can convert itself into and out of an external representation Codab
Swift
encode
Decode
Swift set/get方法
Swift 中重写属性的set和get方法 Swift中如何重写属性的set和get方法 set和get方法的本质是什么 set和get方法紧跟着属性后面写 很紧凑 也清楚 class Person NSObject var name st
Swift
swift
开发语言
ios
Swift里的元组和可选类型
文章目录 元组 Tuples 定义一个元组 元组作为函数的返回值 元组的适用范围 可选类型 Optionals 定义可选类型 示例分析 Optional中使用nil 元组 Tuples 元组将多个值分组为一个复合值 元祖中的值可以是任何类型
Swift
元组
Swift Tuples
iOS PopoverController
iOS PopoverController 背景 UIPopoverController 在iOS9 0 已废弃 UIKIT EXTERN API DEPRECATED UIPopoverController is deprecated P
Swift
App开发
ios
swift
popver
Swift复写UIViewController的init方法
在OC中我们直接复写 init 方法 instancetype initWithLeftViewController UIViewController leftViewController contentViewController UIV
Swift
swift
ios
开发语言
Swift基础语法快速浏览
有些东西很简单 但是我还是把它记录了下来 文章目录 推荐阅读 基础语法快速浏览 基础 值类型转化 控制流 方法 类和对象 枚举和结构体 协议和扩展 错误处理 泛型 推荐阅读 the swift programming language sw
Swift
swift
Swift基础
iOS系统语音识别-Swift
基于Speech框架 实现语音识别转文字功能 系统要求 gt iOS 10 以下是在官方提供的Demo基础上稍作改动 目的有两个 实现连续不间断地语音识别 除非自己手动调用停止 报错自动重新启动 应用切后台后再次进入前台后语音可以正常使用
Swift
speech
Swift 原生网络请求
iOS HTTP请求原生组要的类是URLSession 是一个单例类 例1 GET func makeLogon 构建URL let url URL URL string https xxx xxx API xxx 发送HTTP请求的的se
Swift
URLSession
iOS字典转成JSON换行符问题
问题 使用系统框架将字典转成压缩转义后的JSON字符串 发现字符串中带有多个换行符 系统转JSON的方法如下 let json try JSONSerialization jsonObject with validData options
Swift
JSON序列化
Swift工程main函数去哪里了?
有些东西很简单 但是我还是把它记录了下来 main 函数是所有应用程序的入口 C C Python等所有的应用程序都有且仅有一个main函数作为程序的入口 Swift创建一个新的工程 项目文件中怎么没有main 函数 用OC创建一个新项目后
Swift
swift
main函数
Swift Property ‘self.xxx‘ not initialized at super.init call
Swift重写父类的init方法时 报了如下错误 Property self xxx not initialized at super init call 大概意思是在调用父类init方法前 需要给属性赋值 报错代码 required in
Swift
swift
ios
Objectivec
快速浏览Swift-笔记
快速浏览Swift 笔记 快速浏览Swift https docs swift org swift book GuidedTour GuidedTour html 变量也常量 多行字符串 使用 let quotation I said I
Swift
swift