ios - UIView in UINavigationItem doesn't respond to touches -


so, have uinavigationcontroller embedded in uitabcarcontroller @ index 1. on viewcontroller add uisearchbar uinavigationitem. so, works expected. however, need navigate new viewcontroller navigates new instance of embedded vc.

the flow looks this:

vc 1 -> vc2 -> v1(new instance)  

so, vc1 has uinavigationcontroller embedded in it.

now, issue uiview added uinavigationitem not respond touches anymore, yet visible. i've figured has view heir-achy .

what have tried:

  • removing , reading uisearchbar each time vc1's viewwill/did disappear methods called.
  • adding uisearchbar subview on uinavigationbaronly.
  • setting uisearchbar using self.parentviewcontroller...
  • bringing uisearchbar front using uiview's bringsubviewstofront method.

these either don't solve problem or present few 1 uisearchbar not appear @ all.

if set uisearchbar part of uitableview's headerview problem disappears falls outside of ui design requirements, not option.

so far way can solve issue changing flow of vcs. instead of vc2 going new instance of vc1, instead, pop vc2 off stack no animation , required work needed in vc1 (existing instance). whilst works fine, think might odd user wouldn't able swipe vc2 select different option vc1 preform work on. they'd need go vc2 through original invocation of it.

this how add uisearchbar uinavigationitem :

self.searchcontroller = [[uisearchcontroller alloc] initwithsearchresultscontroller:nil]; self.navigationitem.titleview = self.searchcontroller.searchbar; 


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -