Buttons as Outlets vs IBActions [Objective C + Xcode] -


what point of ever setting button outlet? following tutorial , teacher didn't mention why set button outlet. button suppose action/call method , set ibaction.

he sets button outlet , proceeds change text of button through xcode in viewdidload, why not keep ibaction , change text using settitle: forstate:uicontrolstatenormal ?

isn't button suppose cause action definition?

in logic cases need change behaviour of button , e.g. upon invoking action (triggered other event )you need disable or change backgroundcolor or text.

you don't have set @ times , in many cases useful


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -