[Update: I submitted this to Wrox as Errata. #111228-000495]
Hi There!
The code in the book for this example worked fine for me. But I decided to download the code as well and I think it's messed up. The SampleUIViewController.h file contains three interface implementations(each starting with the "#import <UIKit/UIKit.h>") The last one looks like mine that I created from the books instructions.
Code:
#import <UIKit/UIKit.h>
@interface SampleUIViewController : UIViewController {
UILabel *myLabel;
IBOutlet UISlider *mySlider;
int counter;
}
- (IBAction)buttonPressed:(id)sender;
- (IBAction)sliderMoved:(id)sender;
@property (strong, nonatomic) IBOutlet UILabel *myLabel;
@end
#import <UIKit/UIKit.h>
@interface SampleUIViewController : UIViewController {
UIViewController {
UILable *myLable;
IBOoutlet UISLider *mySlider;
int counter;
}
- ( IBAction )buttonPressed:(id)sender;
- ( IBAction )sliderMoved:(id)sender;
@property (strong, nonatomic) IBOutlet UILabel *myLabel
@end
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController {
int counter;
}
@property (weak, nonatomic) IBOutlet UILabel *myLabel;
- (IBAction)buttonPressed:(id)sender;
@property (weak, nonatomic) IBOutlet UISlider *mySlider;
- (IBAction)sliderMoved:(id)sender;
@end