uitableview - ios: ScrollView + Container + PageViewController + TableView -


i need implement screen image on top. , bellow have 2 sections tableview in each. that:

enter image description here

views hierarchy:

  • scrollview
    • containerview
      • pageviewcontroller
        • tableviewcontroller

when change segment, update scrollview size:

     var containerframe = containerview.frame     let tableview = [songsuserinterface, singersuserinterface][segmentedcontrol.selectedsegmentindex].tableview!     let tableviewcontentheight = tableview.contentsize.height     let containerheight = max(tableviewcontentheight, maxcontainerheight)     containerframe.size.height = containerheight      containerview.frame = containerframe      // set content height of scrollview according container     var scrollframe = scrollview.frame     scrollframe.size.height = containerframe.origin.y + containerheight     //  + height of other subviews below container     scrollview.contentsize = cgsize(width: scrollview.contentsize.width, height: containerframe.origin.y + containerheight) 

and works fine except 1 thing: paging swipe(default pageviewcontroller) not work in blue area:

red - screen size

green - entire content size

blue - content size hidden

enter image description here


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -