#Hello Edgerunners, welcome to the Night-City.

Welcome!

Swift: Codable With Custom Dates

How do you decode a JSON feed that has several custom date formats? If you are lucky using a dateDecodingStrategy might be enough. Unfortunately it has limited support for the .iso8601 format and you can only set one strategy at a time so it does not help when you have two or more different date for...

Swift: Access Levels

You may not have noticed but there was a small but important change to the private access level in Swift 4. After a quick recap of the five levels I cover what has changed in Swift 4, what do you need to know when migrating from Swift 3 and what is the point of fileprivate now? The Five Access Level...

LAContext.biometryType returns LABiometryType.none in iOS 11

I'm trying to support FaceID in my application. Running LAContect().canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) returns true, so I expect that the device has biometrics enabled (which it has, it is an iPhone X with iOS 11.2.1 with FaceID enrolled and working for un...

你应当有控制力,不是控制欲。

What is TIC Read Status?

Apple staff gave the following answer: TIC expands to "TCP I/O connection", which is a subsystem within CFNetwork that runs a TCP connection. For example: TIC Read Status [11:0x0]: 1:57. 1 and 57 are the CFStreamError domain and code, respectively; a domain of 1 is kCFStreamErrorDomainPOSIX and, wi...

Disable the full swipe on a tableview cell in iOS 11

Implement like below: func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { let delete = UIContextualAction(style: .destructive, title: "Delete") { (action, sourceView, completionHandler) in ...

觉得自己年纪轻轻就猫狗双全,真不是一般人。

NYTimes Objective-C Style Guide/纽约时报 移动团队 Objective-C 规范指南

English Version 中文版本 English This style guide outlines the coding conventions of the iOS teams at The New York Times. We welcome your feedback in issues and pull requests. Also, we’re hiring. Thanks to all of our contributors. Introduction Here are some of the documents from Apple that informed t...

Swift 代码规范

这是什么 这是一份 Swift 代码规范和约定, 它存在的目的是: 提高代码明确性, 避免意外错误 减少冗余 增强美感及可读性 留白和空行 行首空白用 Tabs 而非 空格 文件结束时留一行空行 用足够的空行把代码分割成合理的块 不要在一行结尾留下空白, 更不要在空行留下缩进 let/var 在意图明确的情况下尽量使用 let foo = ... 而非 var foo = ..., 因为 let 可以产生安全清晰的代码。 return/break 与 条件判断 在条件判断中, return/break 应尽早被使用, 也就是说, 你应该使用: guard n.available els...

The Objective-C Style Guide/Objective-C 规范指南

English Version 中文版本 English This style guide outlines the coding conventions for {{ site.author }}. Introduction The reason I made this style guide was so that I could keep the code in our books, tutorials, and starter kits nice and consistent - even though we have many different authors working ...

微小的幸福就在身边。

深入理解 Runloop

RunLoop 是 iOS 和 OSX 开发中非常基础的一个概念, 这篇文章将从 CFRunLoop 的源码入手, 介绍 RunLoop 的概念以及底层实现原理. 之后会介绍一下在 iOS 中, 苹果是如何利用 RunLoop 实现自动释放池、延迟回调、触摸事件、屏幕刷新等功能的. 索引 RunLoop 的概念 RunLoop 与线程的关系 RunLoop 对外的接口 RunLoop 的 Mode RunLoop 的内部逻辑 RunLoop 的底层实现 苹果用 RunLoop 实现的功能 AutoreleasePool 事件响应 手势识别 界面更新 定时器 PerformSelecter 关...

What's this?

The Night-City version of CaveOps inspired by Cyberpunk 2077. Not finished yet.

Pinned Message

The Founder and CEO of Infeca Technology.

Developer, Designer, Blogger.

Big fan of Apple, Love of colour.

Feel free to contact me.

反曲点科技创始人和首席执行官。

开发、设计与写作皆为所长。

热爱苹果、钟情色彩。

随时恭候 垂询

Outer Square Inner Square