ios - Swift 3 How to programmatically link an image to a button -


my menu bar

above menu bar/navigation drawer looks like. use in swift file show logo navigation title when menu bar open, works:

navigationitem.titleview = uiimageview.init(image:uiimage(named:"menubartransparent")) 

however, can not figure out how (or find out if it's possible) make image that's created each time menu bar opened, link 1 of menu buttons in list below it. specifically, have "discover bash" button linking url, want image that's created same. thanks!!

there 2 ways that. 1 add uitapgesturerecognizer image view. , second, better, replace uiimageview in titleview uibutton, trigger same function "discover bash" button.


Comments