Skip to content

Instantly share code, notes, and snippets.

JasonY iJasonY

Block or report user

Report or block iJasonY

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
josephchang10 / ReviewRequest.swift
Created Aug 12, 2017
从 iOS 10.3 开始请求应用商店评分的正确姿势:SKStoreReviewController
View ReviewRequest.swift
// ReviewRequest.swift
// Created by 张嘉夫 on 12/8/17.
// Copyright © 2017 张嘉夫. All rights reserved.
import Foundation
import StoreKit
let runIncrementerSetting = "numberOfRuns" // 用于存储运行次数的 UserDefauls 字典键
Josscii / iOS
Last active Apr 29, 2018
iOS Navigation Related Cheat Sheet
View iOS

iOS Navigation Related Cheat Sheet


每个 vc 都有自己的 navigationItem。

// 隐藏 push 的下一个 vc 的 back title。
navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
josephchang10 / blockchain.swift
Created Dec 27, 2017
在 iOS 中实现区块链
View blockchain.swift
import Cocoa
import Foundation
class Block {
var index: Int = 0
var dateCreated: String
var previousHash: String!
var hash: String!
var nonce: Int
Skifary / main.m
Last active Nov 27, 2019
View main.m
#import <Foundation/Foundation.h>
typedef struct __block_impl {
void *isa;
int Flags;
int Reserved;
void *FuncPtr;
typedef void(^GlobalBlock)(void);
Skifary / main.m
Last active Nov 27, 2019
View main.m
#import <Foundation/Foundation.h>
#import "ffi.h"
NSMutableArray *g_allocations;
ffi_cif g_cif;
ffi_closure *g_closure;
void *g_replacement_invoke;
void *g_origin_invoke;
View PSPDFFastEnumeration.h
// PSPDFFastEnumeration.h
// PSPDFFoundation
// PSPDFKit is the leading cross-platform solution for integrating PDFs into your apps:
// Try it today using our free PDF Viewer app:
// This file is MIT licensed.
@protocol PSPDFFastEnumeration <NSFastEnumeration>
OliverLetterer / XCDUUID.m
Created Jan 26, 2013
With this gist, I, as a total assembly noob, am trying to understand the XCDUUID runtime hack ( to be able to use NSUUID on iOS < 6.0.
@implementation XCDUUID
+ (void) load
// query runtime if NSUUID class already exists, if so => done
if (objc_getClass("NSUUID"))
You can’t perform that action at this time.