Tkinter Cheatsheet

Hello World We always need to follow two steps no matter how big the application is, there is always two steps. initialize the widget and shove it on the screen that it. from tkinter import Tk,\ Label #initializing tkinter application root = Tk() # Creating label widget myLabel = Label(root, tex...

CSS Selectors Cheatsheet

Selector Example Example description .class .intro Selects all elements with class="intro" .class1.class2 .name1.name2 Selects all elements with both name1 and name2 set within its class attribute .class1 .class2 .name1 .name2 Selects all elements with name2 that is a de...

Swift: Return instancetype

To return instancetype in Swift, you can define a generic helper method which infers the type of self from the calling context: public extension UIViewController { // Call this public class func instance(storyboard sbname: String, bundle: Bundle? = nil, identifier: String?) -> Self { ...

CocoaPods: Encountered an unknown error (Pod::DSLError) during validation

在发布到 CocoaPods 是如果遇到下面的问题: Validating podspec -> UIMessageBar (1.0.0) - ERROR | [iOS] unknown: Encountered an unknown error (Pod::DSLError) during validation. [!] The spec did not pass validation, due to 1 error. 可以尝试修改 .podspec 文件中类似这样的配置: spec.source_files = 'UIMessageBar/**/*&#...

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...

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