storyboard上で、initial view controllerから他のview controllerに対してrelationshipを確立します。同様に、それらのview controllerから他のview controllerにrelationshipを確立します。最終的に、storyboard上のほとんど、あるいは全てのview controllerを一つのグラフに接続します。接続されたview controllerが、iOSによっていつインスタンス化されるかは、relationshipのタイプによって決まります。
This file contains 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
/// <reference path="../../typings/tsd.d.ts" /> | |
function HelloWorldController($scope) { | |
$scope.message = 'Hello World!!'; | |
} | |
function SampleController($scope) { | |
$scope.simple = '簡易記法を使った方法'; | |
$scope.directive = 'ディレクティブを使った方法'; | |
} | |
function SampleController2($scope) { | |
$scope.text = 'TextBox'; |
This file contains 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
.red | |
color red | |
.blue | |
color blue | |
.solid-border | |
border 1px solid black | |
.dotted-border | |
border 1px dotted black | |
li | |
margin-top 10px |
This file contains 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
:lipstick::lipstick: when improving the format/structure of the code | |
:racehorse::racehorse: when improving performance | |
:non-potable_water::non-potable_water: when plugging memory leaks | |
:memo::memo: when writing docs | |
:penguin::penguin: when fixing something on Linux | |
:apple::apple: when fixing something on Mac OS | |
:checkered_flag::checkered_flag: when fixing something on Windows | |
:bug::bug: when fixing a bug | |
:fire::fire: when removing code or files | |
:green_heart::green_heart: when fixing the CI build |
This file contains 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
// extension | |
extension UIViewController { | |
func observeDidBecomeActive(action: Selector) -> () -> () { | |
return observeNotification(action, name: UIApplicationDidBecomeActiveNotification) | |
} | |
private func observeNotification(action: Selector, name: String) -> () -> () { | |
NSNotificationCenter.defaultCenter().addObserver(self, selector: action, name: name, object: nil) | |
return { | |
return NSNotificationCenter.defaultCenter().removeObserver(self, name: name, object: nil) | |
} |
This file contains 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
extension UIViewController { | |
// こんな感じの公開メソッドを増やしていく | |
func observeKeyboard(willShowSelector: Selector, willHideSelector: Selector) -> () -> () { | |
return observeNotification([ | |
(action: willShowSelector, name: UIKeyboardWillShowNotification), | |
(action: willHideSelector, name: UIKeyboardWillHideNotification)]) | |
} | |
func observeDidBecomeActive(action: Selector) -> () -> () { | |
return observeNotification(action, name: UIApplicationDidBecomeActiveNotification) | |
} |
This file contains 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
goto loc_100000f00; | |
loc_100000f00: | |
COND = OVERFLOW(rax); | |
if (COND) goto loc_100000f1f; | |
loc_100000f09: | |
rbx = rbx + 0x1; | |
if (rbx != 0x65) goto loc_100000f00; |
This file contains 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
let params: [String: AnyObject!] = [ | |
"avatarData": avatarData, | |
"displayName": member.displayName, | |
"currentCharacterId": member.currentCharacterId, | |
"profileView.birthday": member.birthday, | |
"sex": member.sex.rawValue, | |
"profileView.bloodType": member.bloodType.rawValue, | |
"address.country": member.address.country.rawValue, // "address: account.address!.dictはbindされないので。通常のrequestならOK" | |
"profileView.address.prefectures": member.address.prefectures.rawValue, | |
"profileView.hometown.country": member.hometown.country.rawValue, |
This file contains 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
typedef NS_ENUM (<#enumeration type#>, <#enumeration name#>) { | |
<#enumerator1#> = <#value1#>, | |
}; |
This file contains 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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
OlderNewer