Skip to content

Instantly share code, notes, and snippets.

View himaratsu's full-sized avatar

himaratsu himaratsu

  • Indivisual
  • Tokyo, Japan
View GitHub Profile
require 'rubygems'
require 'plist'
TEST_LOG_PATH = "./TestOutput/Logs/Test/"
module XCTestSummaryParser
class TestableSummary
attr_accessor :tests
def initialize(dict)
#!/usr/bin/env bash
# Automatically installs swiftenv and run's swiftenv install.
# This script was designed for usage in CI systems.
git clone --depth 1 https://github.com/kylef/swiftenv.git ~/.swiftenv
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$SWIFTENV_ROOT/shims:$PATH"
if [ -f ".swift-version" ] || [ -n "$SWIFT_VERSION" ]; then
swiftenv install -s
@hosokawa0825
hosokawa0825 / NSObject+CustomMethod.m
Last active August 29, 2015 13:57
Customizable Responder Chain Category
#import "NSObject+CustomMethod.h"
typedef void(^SelectorBlock)(NSObject *responder);
@implementation NSObject (CustomMethod)
#pragma mark associative storage
- (NSObject *)spi_nextResponder
{
NSObject *ao = objc_getAssociatedObject(self, _cmd);
if (ao) {
@ktsukago
ktsukago / gist:8969696
Last active August 29, 2015 13:56
View Controller Containment

View Controller Containment

iOS5以前,View Controllers Containersはappleの特権だった。実際、View Controller Programming Guideにはそれらを使うべきではない旨の記述があった。 かつてView ControllerについてのAppleからの一般的はアドバイスは「1つのview controller は1つの画面の内容を管理する。」だった。 これはそれから「1つのView controllerは自分に含まれるユニットの内容を管理する」に変更された。 Why didn’t Apple want us to build our own tab bar controllers and navigation controllers? (なぜアップルは独自のtab bar controllersやnavigation controllersをbuildさせたくなかったのだろうか?) 具体的に、次の問題はなんだろう

[viewControllerA.view addSubView:viewControllerB.view]
@kishikawakatsumi
kishikawakatsumi / main.m
Created January 14, 2014 18:52
One-line fix for UITextView on iOS 7
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"UIDisableLegacyTextView"];
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
@Kuniwak
Kuniwak / 2013_11_15_githubjp_note.markdown
Last active October 30, 2018 07:06
「GitHub トレーニングチームから学ぶ Git の内部構造」のノートです。 曖昧なところもあるので、間違いがあったら教えてください! http://connpass.com/event/3808/

GitHub トレーニングチームから学ぶ Git の内部構造

Graphs, Hashes, and Compression, Oh My!

Hash について

従来の CVCS (集中バージョン管理システム)のリビジョン番号は連番。 SVN はサーバーにデプロイした時点でリビジョン番号1と設定される。

@ryugoo
ryugoo / iOS7Yahoo.md
Created October 7, 2013 12:40
iOS 7 エンジニア勉強会 @yahoo - 2013/10/07
  • Yahoo! 株式会社
  • 2013/10/07
  • 資料は後ほどシェア

iOS 7 でアプリ開発はどう変わる (佐野さん)

  • iOS 7 のデザイン原則
    • UI はコンテンツに従順 * Safari が分かりやすい
  • ナビゲーションバーが殆ど消える
@ole
ole / update_storyboard_strings.sh
Last active April 4, 2022 06:11
Automatically extract translatable strings from Xcode storyboards and update .strings files. Original version by MacRumors forum user mikezang (http://forums.macrumors.com/showpost.php?p=16060008&postcount=4). Slightly updated by Ole Begemann. NOTE: this Gist moved to a regular repo at https://github.com/ole/Storyboard-Strings-Extraction.
# (File moved to https://github.com/ole/Storyboard-Strings-Extraction)
@setoh2000
setoh2000 / gist:3895173
Created October 15, 2012 20:25
Twitter.frameworkやSocial.frameworkのツイート画面でカーソルの初期位置を先頭にする
#import <Twitter/Twitter.h>
#import <Social/Social.h>
// TWTweetComposeViewControllerの場合 (for iOS5)
- (IBAction)tweet:(id)sender
{
if ([TWTweetComposeViewController canSendTweet]) {
// ツイート用の画面をを表示する
TWTweetComposeViewController* composeViewController = [[TWTweetComposeViewController alloc] init];
[composeViewController setInitialText:@"Hello World!"];