Red > Green > Refactor > Red

cycle is based on desire

iOS

コードで作成したボタンにイベントを付与, titleLabel を意図的に改行

何がしたいか UIButton をコードで作成し、UIViewController に addSubview で表示する 表示したボタン にイベントを付与する(addTarget で) の titleLabel を意図的に改行させる 前提 iOS 8.3 シミュレーター iPad Air 登場人物 ButtonsViewController(.xib…

Mac + 日本語キーボードでバックスラッシュを打ち込む時

option + エンマーク Macにおけるバックスラッシュ(\)の入力方法 - Qiitaqiita.com

UIButton の底(bottom) だけ境界線を太くする

やること 甲. UIButton の境界線太さを設定しました 乙. 底(bottom) の境界線だけ更に微調整で太くしたくなりました (立体的な影をつけるイメージ) 乙. を実現する 前提 iOS 8.1 iPad Air (シミュレーター) 登場人物 CustomButtonsViewController(.xib | .h …

UIButton にリサイズした画像を埋め込む

後述の「課題」が残った方法である事、ご承知下さい やること left_arrow.png(130x46 x1) を (50x50 x1) へ等比率画像に変換する 変換画像をボタン(200x200) に埋め込む 前提 iOS 8.1 iPad Air (シミュレーター) 登場人物 CustomButtonsViewController(.xib …

xib のモックレイアウト(ボタン)をコード内部処理で変更する

やること xib で作成したモックのボタンレイアウトを コードで内部処理して 下を例としたボタンレイアウトに変更する 前提 ストーリーボードは使わない iOS 8.1 登場人物 CustomButtonsViewController(.xib | .h | .m) 内部処理 .xib .h #import <UIKit/UIKit.h> @interface</uikit/uikit.h>…

Incompatible pointer types initializing 'UIButton *' with an expression of type 'UIView'

xib に view - viewButton を設置 viewButton へ UIButton を 1 個設置 このボタンのレイアウトをコードで変更するときに from のコードを書くと表題のエラーが出る ので、to にすればよい from UIView *buttonView = self.viewButton.subviews[0] to UIView…

UISplitViewController で 2 つの ViewController を 1 つの画面に表示する

UISplitViewController で 2 つの ViewController を 1 つの画面に表示する 結果イメージ 前提 Storyboad, Segue は使わない Xcode 6.3.1 iOS 8.1 登場人物 LabelsViewController(.xib | .h | .m) (左側に出す画面) ButtonsViewController(.xib | .h | .m) (…

delegate(デリゲート) は 何か, 何ができるのか

delegate(デリゲート) は 何か 他のオブジェクトがイベント通知を受けた時 このオブジェクトの代わりにアクションを実行するオブジェクト an object that acts on behalf of another object when that object encounters an event in a program 何ができるの…

presentViewController を使って値を受け渡す(渡される)

結果イメージ テキストフィールドに @"out me" を入力 Send ボタンを押下する 別画面が開いて @"out me" が表示される 前提 Storyboad, Segue は使わない Xcode 6.3.1 iOS 8.3 登場人物 InputViewController(.xib | .h | .m) (値を受け渡す ViewController) …

Why use NS* instead of char, int, etc...

to simplify creation of instance for many types Class Clustersdeveloper.apple.com

delegate

Draft article what is GoF Delegation The Gang of Four is wrong and you don't understand delegation - Saturn Flyer with Jim Gaywww.saturnflyer.com non-free article Using prototypical objects to implement shared behavior in object-oriented s…

pragma mark

It's just a mark to categorize. No impact on code. reference thanks for your knowledge sharing What is the significance of #pragma marks? Why do we need #pragma marks?stackoverflow.com #pragmanshipster.com

completion at presentViewController ; what is

iOS

The completion block is used for doing any tasks after presenting the view controller reference thanks for your knowledge sharing what should go into completion in presentViewController?stackoverflow.com UIViewController Class Referencedev…

add ViewController to another ViewController

iOS

In this article, let VC as ViewController will output create base VC sub VC add sub VC to base VC create base VC In this article base VC is TopViewController(.h | .m) Main.storyboard Main.storyboard TopViewController.h #import <UIKit/UIKit.h> @interface </uikit/uikit.h>…

InternalInconsistencyException ... nib but the view outlet was not set

iOS

error snippet InternalInconsistencyException nib but the view outlet was not set background Created custom ViewController Combined it to another ViewController Could loaded xib with 'initWithNibName' But above error happened after build fi…

Terminating app due to uncaught exception ‘NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:

iOS

error Snippet Terminating app due to uncaught exception ‘NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: check If you're working on project 'testproject' 1 XYZ.xib exist on Xcode IDE under directory 'testproject' …

Views and View Controllers ; difference

iOS

just have resources or mange the resources Views Manage Your Application’s Visual Content View Controllers Manage Views Manage Resources Respond to Events Coordinate with Other Controllers Often Work with Containers May Be Presented by Oth…

this class is not key value coding-compliant for the key view.

iOS

2015-05-05 13:31:24.441 ProjectName[993:42467] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<XYZViewController 0x10caafd70> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.' check 1st arg of U</xyzviewcontroller>…

subview on main view(another view) by addSubView

非参考のお願い ... 内容不正確のため 非参考のお願い ... 内容不正確のため 非参考のお願い ... 内容不正確のため subview on main view will do Set components on Main.storyboard as you want Main.storyboard respond to TopViewController(.m | .h) Cr…

difference, ib(interface builder), nib, xib

iOS

ib(interface builder) Graphical Editor for designing UI components nib The resulting interface is stored as a .nib file short for NeXT Interface Builder xib no-compiled nib (XML formatted) Referred to ib and nib xib

when changeable width and height in size inspector

iOS

select 'Freeform' at 'Size' in Attributes inspector width and height can be changeable in Size inspector referred to Unable to change the size of a view in IBstackoverflow.com

logger out zombie objects

same as Xcode 6 How do I set up NSZombieEnabled in Xcode 4?stackoverflow.com

meaning and respond ; signal SIGABRT

iOS

Between some outlet and mainstoryboard links are invalid check all outlet links are valid or ... delete link connections and reconnect them What does "Thread 1: signal SIGABRT" mean? | Treehouse Forumteamtreehouse.com

MVV(M) implements

MVVM Tutorial with ReactiveCocoa: Part 1/2 - Ray Wenderlichwww.raywenderlich.com ZZZViewController.h include view model header ZZZViewController.m ViewModel property is strong ZZZViewModel.h Properties should place in header because used f…

MVVM in Objective-C ; summary, what is

iOS

Introduction to MVVM - Architecture - objc.io issue #13www.objc.io iOS Design Patternswww.raywenderlich.com

outlet - what is

iOS

Tool what ViewController talk over View What is the difference between outlet connection and action connection?stackoverflow.com

the operation couldn’t be completed. (Mach error -308 - (ipc/mig) server died)

iOS

just reboot Xcode don't shut down emulator without xcode's stop button(Stop the running schema or application) Error after Xcode 6.3 updatestackoverflow.com

xcode group

iOS

even files are 'grouped' on xcode the 'grouped directory' is not created on project (any solution? (can sync?)) (below is one) Xcodeのグループとディレクトリ構成を同期させてくれるツール「Synx」 - tobioka.net - You Ain't Gonna Need It offici…

replace class name in .h and .m

iOS

Xcodeのリファクタリング機能を使ってファイル名変更 - Qiitaqiita.com

iOS LifeCycle

iOS

official The App Life Cycledeveloper.apple.com not official What is the Life Cycle of an iPhone application?stackoverflow.com

NSUnknownKeyException this class is not key value coding-compliant for the key

Xcode - NSUnknownKeyException this class is not key value coding-compliant for the keyでドハまりした - Qiitaqiita.com MainStoryboard で不要になったオブジェクトプロパティを削除(ソースコード上で) ガワでは消えていても中身が残ってる