Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8890647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:33:00+00:00 2026-06-14T22:33:00+00:00

I’m trying to develop some reusable ViewController classes. I usually have a two tableViews

  • 0

I’m trying to develop some reusable ViewController classes.

I usually have a two tableViews in on ViewController in my older viewControllers (pre iOS5).

I’m planning a rewrite and I was thinking about using the new iOS 5 containment APIs,
Consider this example:

Ideally, i would use two viewcontrollers, each ViewController having 2 tableViews. At anypoint either ViewController would essentially show 2 tableViews.

I was wondering if I should:
Use 4 ViewControllers, each having a tableView, add those to a ParentContainerView. Arrange them in my previous order.

The problem would be, to be able to show two ViewControllers at the same time in a divided manner, change the behaviour of A viewController when a sliding gesture is IN PROGRESS.

To reflect sliding gestures:

i really cant seem to figure out how to reflect the swiping gestures down to the child view controllers and influence the sliding behaviour of the viewcontroller. Any example would be great.
Forexample, ViewController at index 0 would reduce in width before disappearing to the left when a right swipe gesture is in progress a new ViewController at index 2 appears, all while the middle ViewController (index 1) changes its yposition and not its width.

ANy suggestions would be great,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:33:01+00:00Added an answer on June 14, 2026 at 10:33 pm

    I don’t know if this is what you want, but I’ve implemented something like this using a scroll view with four container views in the scroll view’s content view. Each of those container views has an embedded segue to a view controller (would be a tableViewController in your case).

    So this is how I did it:

    1. I added a scroll view to my view controller
    2. I dragged in a UIView onto the scroll view and set its frame to {{0,0},{640,548}}
    3. Added 4 container views underneath the view from step 2 (by underneath, I mean underneath the view in the objects list on the left side of the screen. It was easier to do it this way since the view doesn’t show its full width on the canvas). I set their frames to {{0,0},{160,548}} {{160,0},{160,548}} {{320,0},{160,548}} and {{480,0},{160,548}}. This gives you four view controllers, each half the width of the screen.
    4. Added another full size view under the scrollview (under in the list, but that means on top in the view hierarchy) and made its background color clear. This view sits on top and intercepts all the touches.
    5. Added 2 swipe gesture recognizers (one left on right) to the view from step 4.

    In the view controller, I created IBOutlets to the scroll view (scroller) and to the large (the 640 x 548 one) view (content), and added this code in the .m file:

    @implementation ViewController
    
    -(void)viewDidAppear:(BOOL)animated {
        [super viewDidAppear:animated];
        self.scroller.contentSize = self.content.frame.size;
    }
    
    -(IBAction)moveLeft:(id) sender {
        if (self.scroller.contentOffset.x < 320)
            [self.scroller setContentOffset:CGPointMake(self.scroller.contentOffset.x + 160, 0) animated:YES];
    }
    
    -(IBAction)moveRight:(id) sender {
        if (self.scroller.contentOffset.x > 0)
            [self.scroller setContentOffset:CGPointMake(self.scroller.contentOffset.x - 160, 0) animated:YES];
    }
    
    @end
    

    The 2 gesture recognizers were connected in IB to the moveLeft: and moveRight: methods. So, this gives me the ability to show controllers 1&2, 2&3, or 3&4 on the screen at the same time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.