Skip to content

Instantly share code, notes, and snippets.

@casspangell
Created May 7, 2012 21:43
Show Gist options
  • Save casspangell/2630665 to your computer and use it in GitHub Desktop.
Save casspangell/2630665 to your computer and use it in GitHub Desktop.
//Other class.h
//Include the needed method's class's .h
#import "AppDelegate.h"
@interface aWebView : UIViewController {
//Create the delegate
AppDelegate *appDelegate;
}
//OtherClass.m
//Call the method in the other class with the appDelegate
- (IBAction) klose:(id)sender{
appDelegate = (SergeAppDelegate*)[[UIApplication sharedApplication] delegate];
[appDelegate.mainViewController hideTheTabBar:NO];
}
//ViewController.h
@interface MainViewController : UIViewController {
}
- (void)hideTheTabBar:(BOOL)hide;
//ViewController.m
- (void)hideTheTabBar:(BOOL)hide
{
theTabBar.hidden = hide;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment