ios - Static UITableView inside ContainerView not Scrolling -


a uiviewcontroller has titleview @ top, uicontainerviewwhich manage 2 tableviewcontroller, , last item uisegmentedcontrol used change between logintableviewcontroller , registertableviewcontroller have 15 cells, it's needed scroll on them.

logintableviewcontroller , registertableviewcontroller statics table views can't scroll, means if scroll it, returns top.

also have viewcontroller has containerview uitableviewcontroller inside isn't static , can scroll.

here code of segmentecontrolaction

@ibaction func selecttab(_ sender: uisegmentedcontrol) {         let nextviewcontroller: uitableviewcontroller!         switch sender.selectedsegmentindex {         case 0:             let loginviewc = logintableviewcontroller.instantiatefromstoryboard()             loginviewc.ispresentingfrommenu = ispresentingfrommenu             nextviewcontroller = loginviewc             break         default:             let regiterviewc = registertableviewcontroller.instantiatefromstoryboard()             regiterviewc.ispresentingfrommenu = ispresentingfrommenu             nextviewcontroller = regiterviewc             break         }          if let currentviewcontroller = currentviewcontroller{             currentviewcontroller.willmove(toparentviewcontroller: nil)             currentviewcontroller.view.removefromsuperview()             currentviewcontroller.removefromparentviewcontroller()         }         currentviewcontroller = nextviewcontroller          addchildviewcontroller(currentviewcontroller!)         containerview.addsubview(currentviewcontroller!.view)         currentviewcontroller!.didmove(toparentviewcontroller: self) } 

do know i'm missing ?

edited

if set tableviewcontrollerwhich has 15 cells embed view of containerview, scroll works, when change childviews in container scroll don't works


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -