#Hello Edgerunners, welcome to the Night-City.

Welcome!

Sierra: 找回消失的允许“任何来源”的应用

自从 Sierra 之后, 系统偏好设置 -> 通用 -> 允许以下位置下载的应用 中的 任何来源 便消失了。 为了找回它,我们打开 终端, 输入: sudo spctl --master-disable 回车,输入密码,之后重新打开设置便可以看到久违的 任何来源 了。这个操作也可以解决一些来自网络的应用提示 已损坏 的问题。...

It's amazing how nice people are to you when they know you're going away.

Xcode 8: 注释快捷键失效的问题

Xcode 8 发布以来,Beta 版有一个可能不是很普遍的问题: 注释快捷键 ⌘ + / 失效。 在 Twitter 上找到一个解决办法,很简单,在终端执行下面的指令,然后重启系统即可。 sudo /usr/libexec/xpccachectl ...

User-Agents

一些常见的 User-Agents 示例: 桌面 IE Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2) Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Mozilla/4.0 (compatible; MSIE 5.0; Windows NT) 其中,版本号是 MSIE 之后的数字。 如: MSIE 8.0 代表 IE8; Windows NT 6.1 对应操作系统 Windows...

CocoaPods: Swift Version

最近使用 CocoaPods 又出了点问题,在执行 pod trunk push 的时候,出现了 Xcode Build 错误,提示了一些关于 Swift 版本的错误。 起初尝试了配置 Xcode 项目中 Use Legacy Swift Language Version 选项,没有作用。于是更新了 CocoaPods 到最新的测试版本 1.1.0,因为新版中允许指定 Swift 版本,有两种方法: 通过 --swift-version VERSION 来指定 通过 .swift-version 文件来指定,你可以用 echo "VERSION" > .swift-version 创建...

iOS: Easy cast with _ObjectiveCBridgeable

Swift is out there for about a year and it’s a great programming language. I think that almost every iOS/OSX developer out there has already written couple of things in Swift (if you haven’t, go ahead and try, you won’t regret it, I promise). Although, we have many years of libs and frameworks built...

iOS: UIAlertController text alignment

Custom text alignment of UIAlertController: let controller = UIAlertController(title: t, message: informative, preferredStyle: type) let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.alignment = alignment paragraphStyle.lineBreakMode = lineBreakMode let messageText = NSMutableAttribute...

Difference between nullable, __nullable and _Nullable in Objective-C

From the Swift blog: This feature was first released in Xcode 6.3 with the keywords __nullable and __nonnull. Due to potential conflicts with third-party libraries, we’ve changed them in Xcode 7 to the _Nullable and _Nonnull you see here. However, for compatibility with Xcode 6.3 we’ve predefined m...
SVG to Data URI Conventer

OS X: Menu Bar Extra is invisible in macOS Dark Mode

周末提交的 APP 又被秒拒, 理由很简单, “Menu Bar Extra is invisible in macOS Dark Mode”, 菜单栏图标在黑色模式中看不到。 由于是第一次用黑白色的图标, 提交之前完全没有考虑到这个问题, 怎么解决呢? 其实很简单。 首先我想到的第一件事是监听, 先试了 NSScreenColorSpaceDidChangeNotification 不起作用, 后来找到了另一个通知: [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(upd...

CentOS: Install Clang

本文主要关于在 CentOS 中安装 Clang 的相关步骤。 (以 CentOS 7 为例) 安装 libstdc++ 如果你正在使用 CentOS 7 及以上的版本,请直接跳过此步骤。 wget https://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++ ln -s /opt/rh/devtoolset-2/root...

Ubuntu: Using Swift

本文主要关于在 Ubuntu 中安装和使用 Swift 的相关步骤。 (以 Ubuntu 15.10 为例) 下载 Swift 在 Swift.org 找到并下载对应的 Swift 版本。 解压 Swift $ cd Swift压缩包所在目录的路径 $ tar -xf Swift压缩包文件名.tar.gz $ mv Swift解压后的文件夹名 /swift (最后一句 mv 是为了方便操作,可以省略,/swift 也可以是其它路径) 举个例子: $ cd /home/meniny/Desktop/swift-2.2.1-RELEASE-ubuntu15.10.tar.gz $ tar -x...

What's this?

The Night-City version of Hotodogo 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