Skip to content

Instantly share code, notes, and snippets.

View kikohz's full-sized avatar
💭
I may be slow to respond.

x kikohz

💭
I may be slow to respond.
View GitHub Profile
Pod::Spec.new do |s|
s.name = 'KNSemiModalViewController'
s.version = '0.4'
s.license = { :type => 'MIT',
:text => <<-LICENSE
UIViewController+KNSemiModal is licensed under MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@kikohz
kikohz / test
Last active January 3, 2016 16:09
kvo test file
{
data: [
{
ad_name: "测试",
ad_des: "这是一条测试数据",
ad_type: "web",
ad_image: "http://ww4.sinaimg.cn/bmiddle/b89e3f89gw1ecnm9ngyipj20c80ewad8.jpg",
ad_url: "http://xxx.com",
ad_location: 0,
ad_id: "0"
@kikohz
kikohz / ImageBrowser.podspec
Created January 20, 2014 15:23
ImageBrowser podspec
Pod::Spec.new do |s|
s.name = 'ImageBrowser'
s.version = 'v0.2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'A simple picture viewer.'
s.homepage = 'https://github.com/kikohz/ImageBrowser'
s.author = { 'H_z' => '[email protected]' }
s.source = { :git => 'https://github.com/kikohz/ImageBrowser.git', :tag => 'v0.2' }
s.platform = :ios
s.source_files = 'Source'
@kikohz
kikohz / Tool.m
Last active August 29, 2015 13:56
身份证号码验证
+ (BOOL)validateIDCardNumber:(NSString *)value {
//检查 去掉两端的空格
value = [value stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
//检查长度
int length = 0;
if (!value) {
return NO;
}else {
length = value.length;
@kikohz
kikohz / podspecfile
Last active August 29, 2015 14:09
HZWebViewController podspec file
Pod::Spec.new do |s|
s.name = "HZWebViewController"
s.version = "0.0.4"
s.summary = "Browser Control"
s.homepage = "https://github.com/kikohz/HZWebViewController"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "kikohz" => "[email protected]" }
s.social_media_url = "http://twitter.com/H_z2"
s.platform = :ios, '5.0'
s.source = { :git => "https://github.com/kikohz/HZWebViewController.git", :tag => "#{s.version}" }
@kikohz
kikohz / gist:0299c7a90c8820aaa7c7
Created July 9, 2015 06:47
获取进京证接口
http://182.92.232.86:8080/tramera/m/cam?m=get
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID`
@kikohz
kikohz / github_member_developer
Created May 9, 2017 08:03 — forked from belm/github_member_developer
GitHub 多人协作开发
GitHub 多人协作开发 三种方式:
一、Fork 方式 网上介绍比较多的方式(比较大型的开源项目,比如cocos2d-x)
开发者 fork 自己生成一个独立的分支,跟主分支完全独立,pull代码后,项目维护者可根据代码质量决定是否merge代码
此方式网上方法比较多,这里不详细描述
有两种常用的方法在GitHub上建立团队合作:
二、组织 – 组织的所有者可以针对不同的代码仓库建立不同访问权限的团队。
Accounts Settings => Organizations =>Create new Organizations 新建一个组织 然后添加项目成员,根据提示设置完毕即可。
新建一个Repository 新建完毕后 进入Repository的Settings =>Collaborators 在Teams下面点击刚创建的组织 比如eveloper-51/owners
/**
* 在发送请求之前,决定是否跳转
*
* @param webView 实现该代理的webview
* @param navigationAction 当前navigation
* @param decisionHandler 是否调转block
*/
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
if (navigationAction.navigationType==WKNavigationTypeBackForward) { //判断是返回类型
/**
* 在发送请求之前,决定是否跳转
*
* @param webView 实现该代理的webview
* @param navigationAction 当前navigation
* @param decisionHandler 是否调转block
*/
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
if (navigationAction.navigationType==WKNavigationTypeBackForward) { //判断是返回类型