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>…

group by clause ; visual representation

DB

If use 'group by', set will be divided to subgroups. implements CREATE TABLE membeers ( name text, age integer, home text ); -- abbreviated insertion... SELECT * FROM members; name | age | home ---------+-----+--------- shimano | 25 | tott…

having clause

DB

description(snippet from reference) The SQL HAVING Clause is used in combination with the GROUP BY Clause to restrict the groups of returned rows to only those whose the condition is TRUE. reference SQL: HAVING Clause

return value of IN predicate ; sql

DB

related to NOT IN ; sql - Red > Green > Refactor > Red snippet from reference >>-+-expression1--+-----+--IN--+-(--fullselect1--)---------+-+->< | '-NOT-' | .-,---------------. | | | | V | | | | +-(------expression2---+--)-+ | | '---express…

Data types concepts ; sql

DB

snippet from reference 4 Concepts 4.1 Data types A data type is a set of representable values. The logical representation of a value is a <literal>. The physical representation of a value is implementation-dependent. A value is primitive in that it</literal>…

cardinality ; what is

DB

snippet from reference The term cardinality actually has two different meanings depending on the context of it’s usage one meaning is in the context of data modeling and the other meaning is in the context of SQL statements. . . when the w…

EXISTS predicate ; sql

DB

snippet from reference 8.8 <exists predicate> Function Specify a test for a non-empty set. Format <exists predicate> ::= EXISTS <table subquery> General Rules 1) Let T be the result of the <table subquery>. 2) If the cardinality of T is greater than 0, then the result of the <exists predicate> is tr…</exists></table></table></exists></exists>

NOT EXISTS ; sql

DB

solution to odd action at NOT IN (...only result) (avoid record If NULL is included) SELECT * FROM members; id | name | age | home ----+---------+-----+--------- 1 | takagi | 23 | tottori 2 | kinashi | 19 | tottori 3 | itano | 20 | osaka 4…

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…

Exception handling

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…

which to use id or instancetype

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, 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

dealloc relase

Difference between release and dealloc in objective-cstackoverflow.com

sql all any

DB

Difference between in and any operators in sqlstackoverflow.com

@property(readonly) 's initialization(initialize)

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, @synthesize ; what is

@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 and retain ; summary, what is

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! …