Skip to content

Instantly share code, notes, and snippets.

@hmiorroi
hmiorroi / get_white-translucent_status_bar.html
Created December 1, 2013 09:59
Get a white-translucent status bar on a "Add to Home Screen" web application. Works on iOS 7.0.3.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="white-translucent" id="status_bar" name="apple-mobile-web-app-status-bar-style" />
<script type="text/javascript">
if(!navigator.standalone && (/iphone|ipod|ipad/gi).test(navigator.platform) && (/Safari/i).test(navigator.appVersion)){
@hmiorroi
hmiorroi / CAShapeLayer+customShape.m
Last active July 25, 2017 10:25
Path export study
//
// CAShapeLayer+customShape.m
//
//
// Created by hmiorroi on 5/3/15.
// Copyright (c) 2015 hmiorroi. All rights reserved.
//
#import "CAShapeLayer+customShape.h"
@hmiorroi
hmiorroi / UIImage+Picker.h
Created June 13, 2017 03:42
color picker
//
// UIImage+Picker.h
//
// Created by hiro on 02/18/2013.
// Copyright (c) 2013 sign g.k. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIImage (Picker)
//
// png export script for Adobe Illustrator
//
// Created by hmiorroi on 10/9/14
// Modified by hmiorroi on 4/20/16
#include "json2.js"
// reqire json2.js see http://www.JSON.org/js.html
var docName = app.activeDocument.name.slice(0,-3);
(function($) {
$.fn.noYkKern = function(){
var _fs = 20;
var _s = $('<span>').css({'font-size':_fs}).html(')。');
var _b = $('<div>').css({'height':'0', 'overflow':'hidden'}).append(_s);
$(this).append(_b);
var _w = _s.width();
_b.remove()
return (_w >= _fs*2)
}