iOS Objective-C Controlling Button Images -
i have button. unsure if uibutton class type. button dragged object library main.storyboard.
i don't have text, instead have image. , plan use 2 images. 1 "loop on" , other "loop off". i'm playing sound , button controls whether or not loop sound. i'm set understanding how looping versus not.
i have set "loop off" image default image under attributes inspector.
so when button gets touched, i'll change behavior of playing sound "loop forever" , i'd change image of button within ibaction function.
i can set title button in attributes inspector.
but don't see title resource name (auto-typing-complete) within viewcontroller.m code.
i know there properties per state images. believe there's "setimage" action uibutton.
what can't determine how button named in code because button added via dragging out of object library.
anyone have knowledge of these resources named, reference file?
a search found close, following link:
http://ranga-iphone-developer.blogspot.com/2011/08/how-to-change-uibutton-image.html
however solution doesn't appear reference particular button name, title, or id; unless text "button" supposed replaced specific resource name.
have added iboutlet uibutton in code. if not see link
Comments
Post a Comment