Incomplete implementation

I'm getting an incomplete implementation warning on my implementation page, which I have commented out:

#import "BIDDatePickerViewController.h"

@implementation BIDDatePickerViewController   // Incomplete implementation

@synthesize datePicker;

- (IBAction)buttonPressed:(id)sender
{
    NSDate *selected = [datePicker date];
    NSString *message = [[NSString alloc] initWithFormat:@"The date and time you selected is:%@", selected];
    UIAlertView *alert = [[UIAlertView alloc]
                          initWithTitle:@"Date and Time Selected" 
                          message:message 
                          delegate:nil 
                          cancelButtonTitle:@"Yes I did" 
                          otherButtonTitles:nil];
    [alert show];
}
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    NSDate *now = [NSDate date];
    [datePicker setDate:now animated:NO];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
    self.datePicker = nil;

}
@end

Also the custom part of the message, showing date, time chosen is not showing up correctly. Why?

Following is the interface file:

#import <UIKit/UIKit.h>

@interface BIDDatePickerViewController : UIViewController

@property (strong, nonatomic) IBOutlet UIDatePicker *datePicker;

-(IBAction)buttonPressed;

@end

Answers


The reason you're getting a warning is because you implemented the method - (IBAction)buttonPressed:(id)sender, while you defined the method -(IBAction)buttonPressed;. Note the lack of an argument on the interface.


Need Your Help

JSLint suppress warning on IntellijJ

javascript intellij-idea jslint jshint

I´m using intellij 14 and I just active the JSLint and JSHint, and it´s pretty useful, burt I dont like the code style of declare variables like var a,b,c instead var a; var b; and var c;

how to add zlib to an existing qt installation

c++ qt zlib

How can I add zlib to an existing installation of Qt. I m pretty new in this so please give me detailed description!