Objective-C
何がしたいか UIButton をコードで作成し、UIViewController に addSubview で表示する 表示したボタン にイベントを付与する(addTarget で) の titleLabel を意図的に改行させる 前提 iOS 8.3 シミュレーター iPad Air 登場人物 ButtonsViewController(.xib…
option + エンマーク Macにおけるバックスラッシュ(\)の入力方法 - Qiitaqiita.com
やること 甲. UIButton の境界線太さを設定しました 乙. 底(bottom) の境界線だけ更に微調整で太くしたくなりました (立体的な影をつけるイメージ) 乙. を実現する 前提 iOS 8.1 iPad Air (シミュレーター) 登場人物 CustomButtonsViewController(.xib | .h …
後述の「課題」が残った方法である事、ご承知下さい やること left_arrow.png(130x46 x1) を (50x50 x1) へ等比率画像に変換する 変換画像をボタン(200x200) に埋め込む 前提 iOS 8.1 iPad Air (シミュレーター) 登場人物 CustomButtonsViewController(.xib …
やること xib で作成したモックのボタンレイアウトを コードで内部処理して 下を例としたボタンレイアウトに変更する 前提 ストーリーボードは使わない iOS 8.1 登場人物 CustomButtonsViewController(.xib | .h | .m) 内部処理 .xib .h #import <UIKit/UIKit.h> @interface</uikit/uikit.h>…
xib に view - viewButton を設置 viewButton へ UIButton を 1 個設置 このボタンのレイアウトをコードで変更するときに from のコードを書くと表題のエラーが出る ので、to にすればよい from UIView *buttonView = self.viewButton.subviews[0] to UIView…
UISplitViewController で 2 つの ViewController を 1 つの画面に表示する 結果イメージ 前提 Storyboad, Segue は使わない Xcode 6.3.1 iOS 8.1 登場人物 LabelsViewController(.xib | .h | .m) (左側に出す画面) ButtonsViewController(.xib | .h | .m) (…
delegate(デリゲート) は 何か 他のオブジェクトがイベント通知を受けた時 このオブジェクトの代わりにアクションを実行するオブジェクト an object that acts on behalf of another object when that object encounters an event in a program 何ができるの…
結果イメージ テキストフィールドに @"out me" を入力 Send ボタンを押下する 別画面が開いて @"out me" が表示される 前提 Storyboad, Segue は使わない Xcode 6.3.1 iOS 8.3 登場人物 InputViewController(.xib | .h | .m) (値を受け渡す ViewController) …
to simplify creation of instance for many types Class Clustersdeveloper.apple.com
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…
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
非参考のお願い ... 内容不正確のため 非参考のお願い ... 内容不正確のため 非参考のお願い ... 内容不正確のため subview on main view will do Set components on Main.storyboard as you want Main.storyboard respond to TopViewController(.m | .h) Cr…
template @try { // process may include exception } @catch(NSException *e) { NSLog(@"Name: %@", [e name]); NSLog(@"Reason: %@", [e reason]); // append if any process exist } ex @try { SampleCustomViewController *viewController = [nib instan…
use instancetype readable (type safe) ex. generally in ‘init’ … ‘init’ returns 'the instance’ so it’s clear if it’s written ‘instancetype is returned’ (id) init; // what type will be returned? (instancetype) init; // ah ... instance will b…
Difference between release and dealloc in objective-cstackoverflow.com
Benedict's Soapbox » Defining an Objective-C @property as Publicly readonly and Privately readwrite readonly in outside interface readwrite in inside interface and implementation (and synthesize) XYZViewController.h #import <UIKit/UIKit.h> @interface XYZ</uikit/uikit.h>…
@property can declare getter/setter property equiv to @property getter/setter|yes @property(readwrite) getter/setter (same as above) @property(readonly) getter|yes @synthesize can cut out getter/setter logic if set @property in interface h…
ARC All you have to do is claim ownership of any object you need and remember to relinquish ownership when you’re done with it. retain The retain method claims ownership of an existing object. It’s like telling the operating system, "Hey! …
same as Xcode 6 How do I set up NSZombieEnabled in Xcode 4?stackoverflow.com
atomic ... property is NOT writable ... @property (atomic) nonatomic ... property is writable ... @property (nonatomic) error: writable atomic property cannot pair a synthesized setter/getter with a user defined setter/getterstackoverflow.…
gist.github.com
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…
NYTimes/objective-c-style-guidegithub.com
Objective-C のプロパティ属性のガイドライン - Qiitaqiita.com
official P38 https://developer.apple.com/jp/documentation/ObjC.pdf unofficial Best way to define private methods for a class in Objective-Cstackoverflow.com
http://stackoverflow.com/questions/2121880/call-instance-method-from-class-method
forward declaration for objective-c interfacesstackoverflow.com c++’s... class definition #import or class declaration @class
http://stackoverflow.com/questions/3907732/objective-c-method-signatures-are-they-inconsistent
http://stackoverflow.com/a/5909310