Sep
10
NYTimes Objective-C Style Guide/纽约时报 移动团队 Objective-C 规范指南
Published 12:09 Sep 10, 2017 by @ezra.
#Programming#
English Version
中文版本
English
This style guide outlines the coding conventions of the iOS teams at...
Sep
10
Swift 代码规范
Published 12:09 Sep 10, 2017 by @ezra.
#Programming# 这是什么
这是一份 Swift 代码规范和约定, 它存在的目的是:
提高代码明确性, 避免意外错误
减少冗余
增强美感及可读性
留白和空行
行首空白用 Tabs 而非 空格
文件结束时留一行空行...
Sep
10
The Objective-C Style Guide/Objective-C 规范指南
Published 12:09 Sep 10, 2017 by @ezra.
#Programming#
English Version
中文版本
English
This style guide outlines the coding conventions for {{ site.author }...
Aug
16
深入理解 Runloop
Published 12:08 Aug 16, 2017 by @ezra.
#Programming# RunLoop 是 iOS 和 OSX 开发中非常基础的一个概念, 这篇文章将从 CFRunLoop 的源码入手, 介绍 RunLoop 的概念以及底层实现原理. 之后会介绍一下在 iOS 中, 苹果...
Aug
12
Encryption: Generate RSA public key with modulus and exponent
Published 12:08 Aug 12, 2017 by @ezra.
#Programming# Was trying to generate a RSA public key with RSA modulus(n) and RSA public exponent(e).
I have tried...
Aug
10
Swift: Generate values collection of Enum types
Published 12:08 Aug 10, 2017 by @ezra.
#Programming# Have you ever done this before:
public enum SomeEnumType: Int {
case a, b, c
public var all...
May
13
Swift: What is @_silgen_name?
Published 12:05 May 13, 2017 by @ezra.
#Programming# As a general Swift developer, one wouldn't come across this attribute, unless working with, say, por...
May
06
iOS: Get Alphanumeric System Version
Published 12:05 May 06, 2017 by @ezra.
#Programming# This is the way to get the alphanumeric system version like 16E195 in 10.3(16E195).
Objective-C Way
...
Apr
01
iOS 10.3: Setup Alternate Icon
Published 12:04 Apr 01, 2017 by @ezra.
#Programming# 最近苹果发布了新的 iOS 正式版本 10.3, 有一个新特性引起了不少人的注意 —— 换图标。
看了看文档, 代码简单到只有一句话:
[[UIApplication sharedApplicati...
Nov
18
Xcode: Showing TODO as a warnig in a Swift Xcode project
Published 12:11 Nov 18, 2016 by @ezra.
#Programming# I rarely use comments when I’m coding1. I do make one exception though; using // TODO: and // FIXME:...
Oct
20
iOS: in6_addr to string
Published 12:10 Oct 20, 2016 by @ezra.
#Programming# 将 struct in6_addr 转换为字符串:
+ (NSString *)formatIPV6Address:(struct in6_addr)ipv6Addr {
NSString *...
Sep
12
Xcode 8: Resource fork, Finder information, or similar detritus not allowed
Published 12:09 Sep 12, 2016 by @ezra.
#Programming# 最近 Xcode 8 中遇到这样一个错误:
.app: resource fork, Finder information, or similar detritus not allowed
其实解决办...