Search Results

Search found 145 results on 6 pages for 'tabbarcontroller'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • Re-Add tabBarController's view into window and the device is in landscape mode

    - by user285553
    Hello, I have an app that is a tabBarController based app. I have 4 tabs on it and one of these is for logging in/out in my app. The main ideea is that when I logout, I release the tabBarController (this will release the all 4 view controllers too - I have done this becuse I want to refersh all the views after logging out to look just like the first time).After this, I alloc it again and add the view controllers aagin,set the tabBarItem's titles,etc.This work ok. The problem is when I am in landscape mode;my logout view is painted to fit the landscape area,but after disconnect(now I releasse and alloc again the tabbarController) the view is painted in portrait mode but my device is in lanscape. After disconnected, I call the releaseOldTabView and the createNewTabView.After this tabBarController is in portrait insead of landscape. -(void)releaseOldTabView:(BOOL)tabViewEnabled{ if(tabViewEnabled){ [tabBarController.view removeFromSuperview]; [tabBarController release]; } } -(void)createNewTabView{ tabBarController = [[UITabBarController alloc] init]; NSMutableArray *oneArray = [[NSMutableArray alloc] init]; tabBarController.delegate = self; LoginViewController *login= [[LoginViewController2 alloc] initWithNibName:@"LoginViewController" bundle:nil]; SecondViewController *secondController = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; ThirdViewController *thirdController = [[ThirdViewController alloc] init]; FourthViewController *fourthController = [[FourthViewController alloc] init]; login.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Login" image:[UIImage imageNamed:@"connect.png"] tag:0]; secondController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"TabBar2" image:[UIImage imageNamed:@"tabBar2.png"] tag:1]; thirdController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"TabBar3" image:[UIImage imageNamed:@"tabBar3.png"] tag:2]; fourthController.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"TabBar4" image:[UIImage imageNamed:@"tabBar4.png"] tag:3]; [oneArray addObject:login]; [oneArray addObject:secondController]; [oneArray addObject:thirdController]; [oneArray addObject:fourthController]; [tabBarController setViewControllers:oneArray]; //[tabBarController.view convertRect:tabBarController.view.frame toView:window]; [window addSubview:tabBarController.view]; [oneArray release]; [login release]; [secondController release]; [thirdController release]; [fourthController release]; } After calling this method, the tabbar view is in portrait,but statusBar(the top bar which says the carrier name) is painted normally(landscape). I also tried the [tabBarController.view convertRect:tabBarController.view.frame toView:window]; but without any succes. Can anyone give a hand of help? Thanks in advance, Alex.

    Read the article

  • UISplitViewCOntroller + TabBarCOntroller + iPad

    - by tek3
    Hi all, I am developing a tab-based iPad application in which corresponding to each tab, I have to show an UISplitViewController . I have done this by adding two navigation controllers to my tabBarController and assigning a subclass of UISplitViewController as RootViewController of both navigationController. And also I have to show both viewControllers(Master and Detail) in both modes(Potrait and Landscape). For this I have constructed a subclass of UISplitViewController in which i am overriding willAnimateRotationToInterfaceOrientation method and setting the frame of both ViewControllers as demonstrated in this link. However i am not able to set both viewControllers correctly.If my app starts in Landscape mode everything displays fine but if i open it in Potrait mode then the orientation of both ViewControllers changes. Sometimes the MasterView occupies the entire screen or sometimes both ViewControllers appear leaving a black line between them and the navigationBar. I have been banging my head over this problem since two days without any success. kindly help..

    Read the article

  • Switch from a View (Login) to another View with a TabBarController

    - by Raphael
    Hi, i'm new at Iphone SDK Developing and now i need some help. I have a LoginView where the User have to authentificate his legitimacy. After he enter his Username and Passwort he click on the "Sign In" Button. Then i want to load my "Real-App". Here is the Problem because i can't switch from the LoginScreen to the TabBarController. I found many solutions but only for switching to other views. Is there a way to do it ?

    Read the article

  • TabbarController in UIViewController in iPhone?

    - by arizah
    I'm pretty much new to iphone development and I started with ViewBasedApplication and I have a UIViewController(GetDetails) and I'm adding a tabBarController to it .There are two tabbar items GetDetails and Login.On startup of app GetDetails view will load up.Now when I click on the other tabbaritem (Login )it has to redirect to LoginViewController.But in my app when I click on Login ,LoginViewController with two textboxes and a button is loaded.But the problem is additionally I am also getting the textbox and button of GetDetailsViewController.For Login tabbaritem I have set the nib name to LoginViewController.. How can I get the corresponding view only when a tabbar item is clicked ?

    Read the article

  • Change TabBarController in detail view

    - by Antriel
    So I have a TabBarController with 2 views. One of the views is a TableView in navigationController. When user selects a row I push a detail view there. I want this detail view to have its own TabBarController different from the former one. So basically the question is if I can push a view on top different view with different TabBarController, but using navigationController not as a modal view.

    Read the article

  • TabBarController rotation problem with popViewControllerAnimated and selectedIndex

    - by rjobidon
    Hi! This is a very important auto rotate issue and easy to reproduce. My application has a UITabBarController. Each tab is a UINavigationController. Auto rotation is handled with normal calls to shouldAutorotateToInterfaceOrientation and didRotateFromInterfaceOrientation. The interface rotates normally until I call UIViewController.popViewControllerAnimated and change UITabBarController.selectedIndex. Steps to reproduce: Create a demo Tab Bar Application. Add the following code to the App Delegate .h file: #import <UIKit/UIKit.h> @interface TestRotation2AppDelegate : NSObject { UIWindow *window; UITabBarController *tabBarController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UITabBarController *tabBarController; (void)doAction; @end // Redefine the interface to cach rotation messages @interface UITabBarController (TestRotation1AppDelegate) @end Add the following code to the App Delegate .m file: #import "TestRotation2AppDelegate.h" @implementation TestRotation2AppDelegate @synthesize window; @synthesize tabBarController; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [window addSubview:tabBarController.view]; [window makeKeyAndVisible]; return YES; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } - (void)dealloc { [tabBarController release]; [window release]; [super dealloc]; } @end @implementation UITabBarController (TestRotation1AppDelegate) - (void)viewDidLoad { [super viewDidLoad]; // Add a third tab and push a view UIViewController *view1 = [[UIViewController alloc] init]; view1.title = @"Third"; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:view1]; NSMutableArray *array = [[NSMutableArray alloc] init]; [array addObjectsFromArray:self.viewControllers]; [array addObject:nav]; self.viewControllers = array; // Push view2 inside the third tab UIViewController *view2 = [[UIViewController alloc] init]; [nav pushViewController:view2 animated:YES]; // Create a button to pop view2 UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; button.frame = CGRectMake(50, 50, 220, 38); [button setTitle:@"Pop this view" forState:UIControlStateNormal]; [button addTarget:self action:@selector(doAction) forControlEvents:UIControlEventTouchUpInside]; [view2.view addSubview:button]; } - (void) doAction { // ROTATION PROBLEM BEGINS HERE // Remove one line of code and the problem doesn't occur. [self.selectedViewController popViewControllerAnimated:YES]; self.selectedIndex = 0; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } @end The interface auto rotates normally until you tap the button on tab #3. Your help will be geatly appreciated!

    Read the article

  • iPhone TabbarController Switch Transition

    - by user269737
    I've implemented gestures (touchBegan-moved-ended) in order to allow for swiping through my tabs. It works. I'd like to add a slide-from-left and slide-from-right transition. It would be better if it could be part of the gesture if statement which tells me if the swipe is towards the right of left. Since I determine which tab is displayed from that, I could show that specific transition along with the new tab. So my question is this: what's the simplest way to simplement a slide transition at a specific instance. I don't want it to be for the whole tabbarcontrol since this is specifically for the swiping. Thanks for the help, much appreciated. For clarification purposes, this is snippet shows how I'm switching tabs: if(abs(diffx / diffy) > 2.5 && abs(diffx) > HORIZ_SWIPE_DRAG_MIN) { // It appears to be a swipe. if(isProcessingListMove) { // ignore move, we're currently processing the swipe return; } if (mystartTouchPosition.x < currentTouchPosition.x) { isProcessingListMove = YES; self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:0]; return; } else { isProcessingListMove = YES; self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:1 ]; return; }

    Read the article

  • tabBarController popToRooTViewControler

    - by Jacob
    Every time a user changes a tab, for the selected tab I want to push it to its top level controller. I have implemented the delegate method for the Tabbarcontroller like this: - (void) tabBarControler:(UITabBarController )tabBarController didSelectViewController:(UIViewController)viewController{ [[self navigationController] popToRootViewController Animated:NO]; } This does nto seem to work but I can confirm the method is being called every time I change tabs

    Read the article

  • TabBarController delegate is not working

    - by Zach
    Hi, Can any one help me, when i am using my UITabBarController delegate it is not working.. I called a delegate method like this.. - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { [self.navigationController popToRootViewControllerAnimated:NO]; }

    Read the article

  • Switching between TabBarController Views when event fired

    - by aahrens
    I have a UITabBarController with two different views to switch between. What I would like to do is when a button is clicked in View1 to switch directly to View2. Then in View2 if they click a button it switches them to View1. It transfers between View1 and View2 when the click on the tabBarController fine but I'm trying to perform the switching for them when an event occurs Is there a way to do this by calling a method on my UITabBarController? @interface CalcAppDelegate : NSObject <UIApplicationDelegate> { UITabBarController *tabBarController; }

    Read the article

  • adding tabbar to uiview (not tabbarcontroller) to switch views

    - by Pavan
    Hi, i added a Tab bar to my existing view called secondViewController where there are now 4 tab bar items using interface builder. This tab bar will allow the users to switch between views. This is what ive tried to do: If i use a tabbar controller, then a new view pops up and i dont want that. i simply want to be able to add a tab bar as ive done and carry on from there. i dont know how to actually connect it all up and make everything work together. This is what i understand: i have to make my current - secondViewController an tabbardelegate which is what ive done as shown @interface paddedDholViewController : UIViewController <AVAudioPlayerDelegate, UITabBarDelegate> { } then i understand that i have to add tabBar.delegate = self; for me to be able to detect the tabBar:didSelectItem: so i can then implement something like this - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { if ([viewController.tabBarItem.title isEqualToString:@"FIRST"]) { NSLog(@"FIRST"); } else if ([viewController.tabBarItem.title isEqualToString:@"SECOND"]) { NSLog(@"SECOND"); } } to be able to switch between the views The thing is as ive said before i dont know how to implement all of this and how to connect everything up. can someone help me please. Thank you in advance

    Read the article

  • tabbarcontroller as a subview

    - by Boaz
    Hi I have a main view screen with navcontroller in my app with two UIbuttons. Now i want that when I press one button a subview will be pushed. this I know how to do. The problem is that I want this subview to be with tabbarcontroller. I know how to implement tabbar on the main views (within the app delegate), but I have really hard time to do this as a subview.. How should I implement this? Thanks.

    Read the article

  • Rotation of ViewController in TabbarController

    - by hanno
    I have a custom UIViewController in a UITabbarController and want to respond to rotation events. When a rotation occurs, the tabbarcontroller and the viewcontroller get rotated. However, the view in the viewcontroller doesn't get redrawn properly: the layout doesn't autoresize and it is black on parts of the screen. The strange thing is that it works when I go to another tab and the back again to my original viewcontroller. What could possibly be wrong? I checked that didRotateFromInterfaceOrientation:fromInterfaceOrientation is being called. However, the view.frame.size values are still the old ones from before the rotation. That's probably not correct.

    Read the article

  • tabBarController and navigationControllers in landscape mode, episode II

    - by unforgiven
    I have a UITabBarController, and each tab handles a different UIViewController that pushes on the stack new controllers as needed. In two of these tabs I need, when a specific controller is reached, the ability to rotate the iPhone and visualize a view in landscape mode. After struggling a lot I have found that it is mandatory subclassing UITabBarController to override shouldAutorotateToInterfaceOrientation. However, if i simply return YES in the implementation, the following undesirable side effect arises: every controller in every tab is automatically put in landscape mode when rotating the iPhone. Even overriding shouldAutorotateToInterfaceOrientation in each controller to return NO does not work: when the iPhone is rotated, the controller is put in landscape mode. I implemented shouldAutorotateToInterfaceOrientation as follows in the subclassed UITabBarController: (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if([self selectedIndex] == 0 || [self selectedIndex] == 3) return YES; return NO; } So that only the two tabs I am interested in actually get support for landscape mode. Is there a way to support landscape mode for a specific controller on the stack of a particular tab? I tried, without success, something like (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if([self selectedIndex] == 0 || [self selectedIndex] == 3) { if ([[self selectedViewController] isKindOfClass: [landscapeModeViewController class]]) return YES; } return NO; } Also, I tried using the delegate method didSelectViewController, without success. Any help is greatly appreciated. Thank you.

    Read the article

  • Pop to root SplitViewController in TabBarController - iOS

    - by Mike Bryant
    TableViewController Context: Here's my app: Tab 1: NavigationController -> ViewController Tab 2: SplitViewController -> Master : TableViewController -> SplitViewController ->TableViewController -> Detail : TableViewController -> TableViewController Tab 3: NavigationController -> ViewController (I'm Here) How do I pop to the root of each tab from a method in the tab 3 (basically a logout button)?

    Read the article

  • iPhone TabBar selection cancelling

    - by Chris Schnyder
    I am developing an iPhone app that displays several views, all acessed via Tab Bar items. However I need to add an additional item to the Tab Bar that simply launches a URL in Safari. I've accomplished this by adding an empty placeholder view to the TabBar and returning FALSE from shouldSelectViewController when the this view's tabBarItem is clicked on, and launching Safari at the same time. That code is: - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController { if([[viewController tabBarItem] title] == "Website"){ //... launch Safari return FALSE; } else { return TRUE; } } PROBLEM: If the TabBar has too many items, and this "Safari Launch" tab is pushed off to the "More" navigation controller, I lose the capability to intercept the event and prevent the view from loading when clicked. Any suggested tips?

    Read the article

  • TabBarController NavigationController with black backgroundbar

    - by Simon
    hello I've placed this code my didload method, to get a black Navigationbar. rootTabBarController.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; rootTabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; its working fine, but when the user rearranges the Icons in the editmode, i'm getting a default blue navigation bar. Can anyone help me to avid this ? btw: big thanks to the genius crowd!

    Read the article

  • iPhone: TabBarController as second level of Navigation Controller

    - by Nebs
    I'm new to iphone development. I've read tutorials about implementing a tab bar controller on the window (eg as the main controller for the app). But how can I create a tab bar controller as a 'standalone' UIViewController that can be called by a navigation bar controller? Basically my navigation bar controller has an array of UIViewControllers that it displays in the table and then loads the appropriate view/controller when a user selects an item. Now I want one of these loaded views/controllers to be a tab bar controller. How can I do this? I'm not sure how to create a tab bar controller on its own without having an outlet/instance in the application delegate. Hope that made sense. Thanks.

    Read the article

  • viewDidAppear called when popping navigationController

    - by Tiago
    I'm having a bit of a problem with the viewDidAppear: method. I have a tabBarController with navigationControllers on each tab, and I have an action that requires that all the navigation controllers pop to their rootViewControllers (programmatically). The problem is that when they pop each navigation controller, the rootViewController's viewDidAppear get's called without it actually being shown. This causes them to do some stuff they were not supposed to (like showing alerts) unless they are actually shown. Besides having to check the currently selected tabBar item, is there any other way to solve this? Thanks.

    Read the article

  • iphone tab bar controller and core data.

    - by Sway
    Ok bit of a newbie type question. I want to use Core Data, together with Tab and Navigation controllers. In XCode if I create a Navigation Based Application I get the option to choose Core Data. Whereas If I create a Tab Bar Application I don't get the choice. I understand that Tab Bars display view controllers so it kinda makes sense. However given that by default it sticks the basic Core Data code in the Application delegate I don't see why this isn't offered. At the moment I'm creating the two projects and cutting and pasting between them. Does this omission in XCode seem weird to you? Is it some sort of oversight? Thanks, Matt

    Read the article

  • How to display the UIActionSheet view from above Tab Bar Controller?

    - by Madan Mohan
    Hi Guys , I need to display the action sheet above the Tab Bar controller. I mean, I would be able to see the Tab Bar controller even the action sheet view is in visible mode. So, Please suggest how to view from above the Tab Bar controller. Is it possible. secondly, How to change the back ground color of action sheet and cancel button back ground colour. Please help me Thank You, Madan Mohan.

    Read the article

  • How to hide tabbar for some pages and make it visible again?

    - by priya
    I've got an application that uses a Tab Bar Controller along with a Navigation Controller.But for some pages I want to hide both bars(Tab & navigation) after that those will be visible again...I am able to hide navigation bar & also done with making. it appear after some pages. I am able to hide tab bar with - (BOOL)hidesBottomBarWhenPushed{ return TRUE; } But problem is how do I make it Visible again after some pages?

    Read the article

1 2 3 4 5 6  | Next Page >