Thanks that got it working.
What I'm really trying to do is make is a button in a different view hidden. The switch is in settingsView and the button is in rulesView. Here is my .h files:
Code:
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@class RulesView;
@interface SettingsView : UIView {
IBOutlet UISwitch *solutionSlider;
IBOutlet UISwitch *soundSlider;
IBOutlet UISwitch *shakeSlider;
}
-(IBAction)solutionSlider:(id)sender;
-(IBAction)soundSlider:(id)sender;
-(IBAction)shakeSlider:(id)sender;
@end
Code:
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface RulesView : UIView {
IBOutlet UIButton *showAnswer;
}
//this is the method/action which contains the code to load the answer site
-(IBAction)showAnswer:(id)sender;
@end
The button I want the switch to hide is called showAnswer.
Could you tell me what I'm doing wrong. I have a rough idea (settingsView doesn't know about showAnswer button because it's in a different view) and I thought all I had to do was add the @class part) but can;t get it to work. Oh I also added
Code:
#import "RulesView.h"
to my settingsView.m file