Skip to content

Instantly share code, notes, and snippets.

💭
生きている

KZ k3zi

💭
生きている
Block or report user

Report or block k3zi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View japanese.md

Japanese

Accent Tips

促音(そく\おん・そくおん)
・っ or ッ sound

促音便(そくお\んびん)
・At the end of the 連用形(勝ち、食い、帰り) when the 動詞 comes next to a て・た・たり、 a 促音(っ) is introduced in between.
・This only occurs with the following endings「ち」「ひ・い」「り」

@k3zi
k3zi / MyTableViewController.swift
Created Jun 17, 2016
Masks any cells behind the section header of a .Plain UITableView
View MyTableViewController.swift
override func scrollViewDidScroll(scrollView: UIScrollView) {
super.scrollViewDidScroll(scrollView)
for cell in self.tableView.visibleCells {
let hiddenFrameHeight = scrollView.contentOffset.y + self.tableView(tableView, heightForHeaderInSection: 0) - cell.frame.origin.y
if hiddenFrameHeight >= 0 || hiddenFrameHeight <= cell.frame.size.height {
self.maskCell(cell, fromTopWithMargin: hiddenFrameHeight)
}
}
@k3zi
k3zi / MPNavigationAnimatedTransitiion.swift
Last active May 3, 2017
A basic transition that properly pushes off transparent views
View MPNavigationAnimatedTransitiion.swift
import UIKit
class MPNavigationAnimatedTransitiion: NSObject, UIViewControllerAnimatedTransitioning {
let operation: UINavigationControllerOperation
init(operation: UINavigationControllerOperation) {
self.operation = operation
}
@k3zi
k3zi / PSPDFUIKitMainThreadGuard
Last active Aug 29, 2015
Automatically kick all UIKit calls to Main Thread
View PSPDFUIKitMainThreadGuard
#import <objc/runtime.h>
#import <objc/message.h>
// Compile-time selector checks.
#define PROPERTY(propName) NSStringFromSelector(@selector(propName))
// A better assert. NSAssert is too runtime dependant, and assert() doesn't log.
// http://www.mikeash.com/pyblog/friday-qa-2013-05-03-proper-use-of-asserts.html
// Accepts both:
You can’t perform that action at this time.