ios - Find out the parent view of a clicked button in swift -
i have code have 3 buttons , find out parent view of buttons when clicked
@ibaction func resizebuttonclicked(sender: uibutton) { if(sender.isequal(resizebutton)) { //this convert small square } else if(sender.isequal(maximizebutton)) { //this convert maximized view } else if(sender.isequal(closebutton)) { //this close view } }
now can identify sender button how identify view button sitting in?
thank you
nikhil
please try following
sender.superview
Comments
Post a Comment