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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -