Hi
I am working through Apress Beginning IOS 6 development. I am on chapter 4 and have a couple of errors. Firstly I cant seem to connect the "label" to the .m file. Ctrl dragging has no affect - although a blue line appears, nothing appears in the .m file (i.e no pop up appears).
Also I get an error stating property 'sliderlabel' not found on the object of type BIDController ? (see screenshot). Thanks
here's the .h file :-
and the .m file is below:-
I am working through Apress Beginning IOS 6 development. I am on chapter 4 and have a couple of errors. Firstly I cant seem to connect the "label" to the .m file. Ctrl dragging has no affect - although a blue line appears, nothing appears in the .m file (i.e no pop up appears).
Also I get an error stating property 'sliderlabel' not found on the object of type BIDController ? (see screenshot). Thanks
here's the .h file :-
Code:
//
// BIDViewController.h
// Control Fun
//
// Created by Kapil Kapur on 19/07/2013.
// Copyright (c) 2013 Apress. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface BIDViewController : UIViewController
@property (strong, nonatomic) IBOutlet UIView *nameField;
@property (weak, nonatomic) IBOutlet UITextField *numberField;
-(IBAction)textFieldDoneEditing:(id)sender;
-(IBAction)backgroundTap:(id)sender;
@end
and the .m file is below:-
Code:
/
// BIDViewController.m
// Control Fun
//
// Created by Kapil Kapur on 19/07/2013.
// Copyright (c) 2013 Apress. All rights reserved.
//
#import "BIDViewController.h"
@interface BIDViewController ()
@end
@implementation BIDViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(IBAction)textFieldDoneEditing:(id)sender
{
[sender resignFirstResponder];
}
-(IBAction)backgroundTap:(id)sender{
[self.nameField resignFirstResponder];
[self.numberField resignFirstResponder];
}
- (IBAction)sliderChanged:(UISlider *)sender {
int progress =lroundf(sender.value);
self.sliderLabel.text= [NSString stringWithFormat:@"%d",progress];
}
@end