ios - Make transition between two Menus with UIScrollView -
i want have 2 menus (the other 1 same 1 shown in screenshot, contain other items).
each menu in own uistackview
.
i've decided rule out uipageviewcontroller
, instead use uiscrollview
because it's behaviour want.
how can put both menus inside of uiscrollview
, make nice animation?
are avoiding uipageviewcontroller because of complexity? because if there easier way accomplish same gesture controlled transition using uiscrollview's pagingenabled property
based on see in screenshots...
var size = cgsize() size.height = self.view.frame.height size.width = self.view.frame.width * 2 let scrollview = uiscrollview() scrollview.frame = self.view.frame scrollview.contentsize = size scrollview.pagingenabled = true scrollview.showshorizontalscrollindicator = false nav.center.y = scrollview.frame.height / 2 nav.center.x = scrollview.frame.width / 2 nav2.center.y = scrollview.frame.height / 2 nav2.center.x = nav.center.x + scrollview.frame.width scrollview.addsubview(nav1) scrollview.addsubview(nav2) self.view.addsubview(scrollview)
Comments
Post a Comment