Skip to content

Instantly share code, notes, and snippets.

View tokijh's full-sized avatar
๐ŸŽฏ
Focusing

Yoon Joonghyun tokijh

๐ŸŽฏ
Focusing
View GitHub Profile
@tokijh
tokijh / PrintMethodPropertyIvar.m
Created June 3, 2021 19:25 — forked from Koze/PrintMethodPropertyIvar.m
Print Method List, Property List, and Ivar List
#import <objc/runtime.h>
void PrintMethodList(Class cls) {
printf("// Method List of %s\n", class_getName(cls));
unsigned int outCount;
Method *methodList = class_copyMethodList(cls, &outCount);
for (unsigned int i=0; i<outCount; i++) {
Method m = methodList[i];
SEL sel = method_getName(m);
printf("%s\n", sel_getName(sel));
@tokijh
tokijh / README.md
Created April 10, 2020 04:33
Stubber ์—์„œ ๊ฐ™์€ ํ•จ์ˆ˜์ธ๋ฐ functionAddress ๊ฐ€ ๋‹ค๋ฅด๊ฒŒ ์„ค์ •๋˜๋Š” ๋ฌธ์ œ

Stubber ์—์„œ ๊ฐ™์€ ํ•จ์ˆ˜์ธ๋ฐ functionAddress ๊ฐ€ ๋‹ค๋ฅด๊ฒŒ ์„ค์ •๋˜๋Š” ๋ฌธ์ œ

// [register]
// arguments type : () -> ()
// return type : ()
// function address : 5003223104
Stubber.register(someClass.some(completion:)) { completion in
  completion()
}
@tokijh
tokijh / LimitSubscribe.swift
Created October 8, 2019 13:30
Subscribe ๋ฅผ ํ•œ ๋ฒˆ๋งŒ ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š” Operator ์ž…๋‹ˆ๋‹ค.
import RxSwift
import class Foundation.NSRecursiveLock
extension ObservableType {
func limitSubscribe() -> Observable<Element> {
return LimitSubscribe<Element>(source: self.asObservable()).asObservable()
}
}
final class LimitSubscribe<Element>: ObservableType {
@tokijh
tokijh / .swiftlint.yml
Created July 2, 2019 07:00
Swift List style
included:
- PROJECT/
- PROJECT_TESTS/
excluded:
- Pods/
opt_in_rules:
- attributes
- closure_end_indentation