プログラミング
公式サイト business.line.me 公式ドキュメント https://developers.line.me/bot-api/overview コード付き(php)紹介記事 qiita.com 事例紹介 blog.minato.jp.net
経緯 xcodeのpage-based-applicationのサンプルに以下のコードがあり、 self.pageViewController!.setViewControllers(viewControllers, direction: .Forward, animated: false, completion: {done in }) 「completion: {done in }」がよくわからなかったの…
状況 class ViewController: UIViewController { var 記事データ:記事 override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } override func viewWillAppear(animated: Bool) …
結論:delegateパターンを使うことによって、クラスAで実行するメソッドの処理をクラスBに委譲することができる 参考: Swift:delegate(デリゲートパターン)の使い方とサンプルコードwww.sirochro.com
プロトコルとは、ある機能に必要なメソッド宣言をまとめたもの 具体例。画面をタッチした時の処理をまとめたもの。 cocos2dのソースです(CCTargetedTouchDelegate.h)。 @protocol CCTargetedTouchDelegate <NSObject> /** Return YES to claim the touch. @since v0.</nsobject>…
Cocos2dいじってて「^」記号(サーカムフレックス)がついた関数めいたものがあったので調査。 結論:ブロックオブジェクトとは、Objective-Cにおけるクロージャ。 以下、詳解Objective-C2.0(340-342p)より。 構文。 ^(引数列) {本体} 具体例。 詳解 Objec…
^ ↑これ。 サーカムフレックス って名前らしいです。サーカムフレックス - Wikipedia
iphoneアプリ勉強していて気になったのでメモ クラス自体もひとつのオブジェクトであるクラスオブジェクトは、クラスメソッドを持つクラスメソッドは、そのクラスのインスタンスを生成するファクトリメソッドとも呼ばれるC++などは、この考え方を取っていな…
Symfonyの実装を読んでいて気になったので調査。ドキュメントによると、 PHP: array_diff - Manual array array_diff ( array $array1 , array $array2 [, array $... ] ) array1 を array2 と比較し、その差を返します。 ということらしい。「差」ってなん…