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

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -