Add sub-interface in ScrollView
.. directly on the code.
Self.navigationController.navigationBar.translucent =NO; Firsttableviewcontroller*FIRSTVC =[[Firsttableviewcontroller alloc] init]; Secondtableviewcontroller*SECONDVC =[[Secondtableviewcontroller alloc] init]; Thirdtableviewcontroller*THIRDVC =[[Thirdtableviewcontroller alloc] init]; FirstVC.view.frame=Self.view.frame; FirstVC.view.backgroundColor=[Uicolor Lightgraycolor]; SecondVC.view.frame= CGRectMake (Self.view.frame.size.width,0, Self.view.frame.size.width, self.view.frame.size.height); SecondVC.view.backgroundColor=[Uicolor Graycolor]; ThirdVC.view.frame=cgrectmake (self.view.frame.size.width*2,0, Self.view.frame.size.width, self.view.frame.size.height); ThirdVC.view.backgroundColor=[Uicolor Darkgraycolor]; Uiscrollview*scrollview =[[Uiscrollview alloc] init]; Scrollview.frame=Self.view.frame; Scrollview.contentsize= Cgsizemake (self.view.frame.size.width*3, Self.view.frame.size.height); Scrollview.pagingenabled=YES; Scrollview.backgroundcolor=[Uicolor Darkgraycolor]; [Self.view Addsubview:scrollview]; [ScrollView AddSubview:firstVC.view]; [Self ADDCHILDVIEWCONTROLLER:FIRSTVC]; [ScrollView AddSubview:secondVC.view]; [Self ADDCHILDVIEWCONTROLLER:SECONDVC]; [ScrollView AddSubview:thirdVC.view]; [Self ADDCHILDVIEWCONTROLLER:THIRDVC];
is to add a scrollview in Viewcontroller. Then add three view,.. At the same time, add the three view controller to this Viewcontroller self-controller.
[A gull's training note] [Objective-c] [Seventh Day] [Personal notes]