How to remove or clear a Tabbar image in iphone? - iphone

Currently, I am working in simple iPhone application, using Tabbar to create three option and set three images in each view controller, then I click second tabbar show the viewcontroller2 and navigate to another screen, at the time i want to clear or remove tabbar image from this screen, But I can't fix this, please help me.
Thanks in Advance
I tried this:
[[UITabBar appearance] setAlpha:0.5];

Use this to solve it:
UITabBarItem *filterTab = [self.tabBarController.tabBar.items objectAtIndex:3];
[filterTab setImage:[UIImage imageNamed:#""]];
You can also pass a nil value for the setImage property. Like: [filterTab setImage:nil];

Do this at the point you want to hide the tab bar view. (maybe in viewWillAppear in the other screen you navigate to from viewcontroller2.
[self.tabbarcontroller.tabbar setHidden:YES]

It can be possible if you do
presentModalViewController
on UIWindow
I think, this will solve your issue
Hope it helps you....

Related

MPMediapickercontroller tab bar overlap with custom tab bar in iPhone

I can hide or unhide tab bar in navigation controller. But issue when I use presentModelViewController of MPMediapickercontroller, and even when hiding custom tab bar, it overlaps the tab bar of MPMediapickercontroller.
Please take a look at this image.
This is a default 'MPMediapickercontroller' presented.
I have been surfing to find this fix but with no success.
In MPMediapickercontroller its always present modally. so one solution for that is you have to use image which is same as tabbar of MPMediapickercontroller.
Here is that image. use without any border just white image thats it.
Now, below is my code.
In Viewwillappear method you have to set that image in tabbar appearance.
-(void)viewWillAppear:(BOOL)animated
{
[[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:#"tabDefault"]];
[super viewWillAppear:YES];
}
Then whatever you want presentModelViewController of MPMediapickercontroller
in last you done all things then you have to use dealloc method to set Tabbar same as you required permanent.
-(void)dealloc
{
[[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:#"tab2"]];
}
I solved my problem from this. hope you done it.

iphone App : How to remove toolbar from navigation controller

In my app first time I have taken navigation controller toolbar. After faced some problems i remove toolbar and then i took navigation controller navigationbar.
Now my problem is when I run my app navigation controller toolbar show in the bottom part of screen. when i hide toolbar then botton controls functionality doesnt work.
Please guide me.
Suggest me the way to do this.
Thanks
self.navigationController.toolbarHidden=YES;
Try this code:
self.navigationItem.leftBarButtonItem = nil;
self.navigationItem.hidesBackButton = YES;
For more information, Visit UINavigationItem Class Reference
Hope this helps.

PopOver in a UItabBar

I need to create a popover in a tabBar in the right side of it.
Like the:
self.navigationItem.rightBarButtonItem
property in a navigationBar.
(Forget the other buttons, i just need one button.)
Any idea of how doing this??
Thanks
If you want a popover to appear over a tabbaritem you could look at my answer here: UIPopoverController placement

Pushing a UITabBarController with a UINavigationBar onto an existing UINavigationBar

Okay I am working on a group project and what we are trying to do is create a "Results Screen" which has It's Own UINavigation and contains two TabBars in it. We are trying push that ontop of an existing UINavigation. Right now at the moment of this code. We have our main App Delegate and in it we instantiate a beginning navigation and tabbar.
startTabBarController.viewControllers=[NSArray arrayWithObjects:templatesVC,recentJobsVC,profileVC,aboutVC,nil];
startTabBarController.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:#"D2P_Logo2.png"]];
startTabBarController.navigationItem.titleView.backgroundColor = [UIColor clearColor];
UIBarButtonItem *tempRightBarButton = [[UIBarButtonItem alloc] initWithTitle:#"New"
style:UIBarButtonItemStylePlain
target:self
action:#selector(makeJob)];
[startTabBarController.navigationItem setRightBarButtonItem:tempRightBarButton];
[mainNavBar pushViewController:startTabBarController animated:NO];
[window addSubview:mainNavBar.view];
Now what we want to do is add another Tab Bar on top with a segmented navigation controller and a tab bar controller.
At the moment were are trying a UIViewController without a xib to do this. I've tried various methods but all that has come up is a blank screen.
In Terms of Layout of what we have we have a Navigation Controller and on it's stack is a UITabBarController -> UITableViewController -> UITableViewController and we want to add on top of that a UIViewController with a UINavigationController and UITabBarController in that.
Any Advice would greaty be appreciated. Thanks in Advance.
Never mind, I found a solution. Ended up using a ModelViewController and then had some issues with a white bar which I solved by searching around these very forums and found out that I just had to hide the status bar before showing the ModelViewController and showing it after it was loaded.
Thanks anyways though.

iPhone SDK: Advancing from one view to another using a button tap

I want to make a really simple iphone app: one screen with a single button... when the button is tapped a new screen appears. That's it. No animations, nothing,
I've tried endlessly to make the NavBar sample project do this... and it works but only if I use a UINavigationController with a table that I can tap etc. I've tried all the skeleton projects in XCode too.
I thought I was done when I did this:
[[self navigationController] presentModalViewController:myViewController animated:YES];
But I couldn't do it without the UINavigationController. I just want a simple example.
Thanks so much!
One way you could do this is to create a new UIView and then when the button is pressed add that new UIVIew as a subview, therefore making it what you see.
If you make the new view its own subclass of UIView you would do something like this.
LoginView *login = [[LoginView alloc] initWithFrame: rect];
[mainView addSubview: login];
[self presentModalViewController:myViewController animated:NO];
Will pop up a new view, no animations, nothing. To get rid of it, inside myViewController:
[self dismissModalViewControllerAnimated:NO];
Though I reccomend you use the nice sliding animations (change NO to YES.) And yes, you can stack them up. I think this is better than creating a new UIView, but I may be wrong.
The correct way to do this is set up your project with a UINavigationController. In your root view controller, add your button in the view controllers's view. Then in viewDidLoad, register for UIControlEventTouchUpInside events from you button. Then, in your event callback, call:
[self.navigationController pushViewController:[[[SecondViewControllerClass alloc] initWithNib:nibName bundle:nil] autorelease]];
What kdbdallas suggested will work, but you won't get the nice sliding effects, nor will the navigation bar automatically change and provide your users with a back button.