- Singleton
- Abstract Factory - |NSWindow| (Theme, Style)
- Builder - WebKit Document Representation
- Prototype - |NSCollectionViewItem|, Cell
- FactoryMethod - |NSDocument|, ClassCluster
- Adapter - Delegate, CocoaBinding
- Bridge - |NSImageRep|, Wrapper
- Composite - View Hierarchy, Tree
- Decorator - |NSBox|, |NSScrollView|
- Facade - |NSTextView|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AssertEventually.h | |
// LRResty | |
// | |
// Created by Luke Redpath on 03/08/2010. | |
// Copyright 2010 LJR Software Limited. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "HCMatcher.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this in lib/current_controller_and_action.rb | |
module Padrino | |
module Rendering | |
module InstanceMethods | |
private | |
# Override render to store the current template being rendered so we can refer to it in the view | |
# This works with Padrino >= 0.9.10 | |
def render(engine, data=nil, options={}, locals={}, &block) | |
# If engine is a hash then render data converted to json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.class | |
*.swp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script for managing build and version numbers using git and agvtool. | |
# Change log: | |
# v1.0 18-Jul-11 First public release. | |
# v1.1 29-Sep-12 Launch git, agvtool via xcrun. | |
version() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# (Above line comes out when placing in Xcode scheme) | |
# | |
API_TOKEN=<TestFlight API token here> | |
TEAM_TOKEN=<TestFlight team token here> | |
SIGNING_IDENTITY="iPhone Distribution: Development Seed" | |
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision" | |
#LOG="/tmp/testflight.log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__block dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); | |
dispatch_async(queue, ^{ | |
// hogehoge | |
// ここに処理を書く | |
// | |
dispatch_semaphore_signal(semaphore); | |
}); | |
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); | |
dispatch_release(semaphore); |
see also.
オレオレUIViewControllerコーディングガイドライン オレオレUIViewコーディングガイドライン
ここで述べるターゲットはiOS5, Lion以降, ARC
基本はコーディングガイドラインに沿う。
つまり、親クラス: コーディングガイドライン
- 必要に応じてViewの内部で保有関係を階層化する
- 一番親のView(Controllerと直接やりとりするView)でのControllerへのメッセージ送信にはデリゲートモデルを使う
Cocoa(iOS)はMVVC(Model-View-ViewController)パターンである。by me, 2011
ここで述べるターゲットはiOS5, Lion以降, ARC
OlderNewer