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

  • SEARCH
  • Home
  • 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 7607231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:36:32+00:00 2026-05-31T00:36:32+00:00

I have a class that is a subclass of UITabBarController which contains 4 child

  • 0

I have a class that is a subclass of UITabBarController which contains 4 child viewControllers. I’ve added a button similar to RedLaser, Instagram, Path, DailyBooth, and other apps. Mine is like the top example here:

Image of tabBar with center button

This button calls a method in the TabBarController which presents a modal viewController. When it’s dismissed, the NavigationControllers in the currently selected viewController starts to behave strangely. The pop animation is all messed up and other small bugs happen until you select another tab on the tabBar. Then the animations are fine until the viewController is presented again.

I’m sure it’s because I’m dismissing it incorrectly, but I’m not sure how this is to be done.

this is my code in the TabBarController:

-(void)showScanner {
    ZBarReaderViewController *reader = [[ZBarReaderViewController alloc] init];
    reader.readerDelegate = self;
    reader.supportedOrientationsMask = ZBarOrientationMaskAll;

    ZBarImageScanner *scanner = reader.scanner;
    [scanner setSymbology:ZBAR_I25
                   config:ZBAR_CFG_ENABLE
                       to:0];
    [scanner setSymbology:ZBAR_QRCODE
                   config:ZBAR_CFG_ENABLE
                       to:0];

    [reader setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
    [self presentModalViewController:reader
                            animated:YES];
    [reader release];
    //[self playBeep];
    }

-(void)imagePickerController:(UIImagePickerController *)picker     didFinishPickingMediaWithInfo:(NSDictionary *)info {
    id<NSFastEnumeration> results = [info objectForKey:ZBarReaderControllerResults];
    ZBarSymbol *symbol = nil;
    for (symbol in results)
        break;
    NSString *barcode = symbol.data;

    UINavigationController *searchNavController = [[self viewControllers] objectAtIndex:1];
    WLSearchViewController *searchVC = [searchNavController.viewControllers objectAtIndex:0];

    //    WLSearchViewController *searchVC = [[self viewControllers] objectAtIndex:1];
    //[searchNavController popToRootViewControllerAnimated:NO];
    [self setSelectedViewController:searchNavController];
    [self dismissModalViewControllerAnimated:YES];

    [self playBeep];

    [searchVC handleSearchForTerm:barcode];
}

-(void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
    [self dismissModalViewControllerAnimated:YES];
}
  • 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-05-31T00:36:33+00:00Added an answer on May 31, 2026 at 12:36 am

    Found what was wrong, figured I’d post this to help anyone else who’s facing this.

    I had overridden a viewDidAppear:animated: in my tabBarController but I didn’t call [super viewDidAppear:animated:]

    Added that and everything was better!

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

Sidebar

Related Questions

I am working in a class that is a subclass of UITableViewCell and have
I have a ConfiguracaoDaApp class in my project that is a NSManagedObject subclass. I
I have created a subclass of UITableViewController that is used as the custom class
I have a class that conforms to UISearchDisplayDelegate and contains a UISearchBar. This view
I have a root UIViewController subclass that has a UITabBar, (I'm not using UITabBarController)
I have a class that defines some defaults, and a subclass that defines some
I have a class that inherits a base class to which another class has
I have a parser class that is subclass of NSOperation. It is used to
I have a Moose class that is intended to be subclassed, and every subclass
I have a class that's a subclass of NSOperation (actually a subclass of ASIHTTPRequest,

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.