Skip to content

Instantly share code, notes, and snippets.

View TomoyaOnishi's full-sized avatar

Tomoya Onishi TomoyaOnishi

View GitHub Profile
@TomoyaOnishi
TomoyaOnishi / README.md
Last active April 5, 2018 11:18
画像からテキストを抜き出してコピーできるようにするMacデスクトップアプリです。

ExtractTextTool

Google Vision APIが叩けるAPIキーが必要です。

アプリケーションエリアに画像をドロップすると、Google Vision APIによってテキスト情報を抽出し、コピーできるようにリスト化します。

そのうちInAppPurchaseが実装できたらWindows&MacAppStoreに配信予定です。

技術

  • electron
@interface CustomView: UIView
- (instancetype)init;
@end
@implementation
- (instancetype)init
{
UINib *nib = [UINib nibWithNibName:@"CustomView" bundle:nil];
self = [nib instantiateWithOwner:self options:nil][0];
override func viewDidLoad() {
super.viewDidLoad()
let view = UIView(frame: CGRectZero)
view.setTranslatesAutoresizingMaskIntoConstraints(false)
view.backgroundColor = UIColor.redColor()
self.view.addSubview(view)
let views = ["view": view]
let h = NSLayoutConstraint.constraintsWithVisualFormat("|[view]|", options: nil, metrics: nil, views: views)
let v = NSLayoutConstraint.constraintsWithVisualFormat("V:|[view]|", options: nil, metrics: nil, views: views)
@TomoyaOnishi
TomoyaOnishi / UISwitchBugViewController.m
Last active August 29, 2015 13:56
UISwitchのバグ
- (void)viewDidLoad
{
[super viewDidLoad];
// UISwitchのバグ
// スワイプでON・OFFしようとすると
// セットしたセレクタが連続で呼び出される。
UISwitch *hogeSwitch = [[UISwitch alloc] init];
hogeSwitch.center = self.view.center;
[hogeSwitch addTarget:self action:@selector(hogeSwitchDidChangeValue:) forControlEvents:UIControlEventValueChanged];
@TomoyaOnishi
TomoyaOnishi / RNAppDelegate.m
Last active January 3, 2016 18:58
push通知を受け取った時にサーバから情報をダウンロードする
//
// RNAppDelegate.m
// RemoteNotification
//
// Created by TomoyaOnishi on 2014/01/19.
// Copyright (c) 2014年 TomoyaOnishi. All rights reserved.
//
#import "RNAppDelegate.h"