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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -