Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Semantic Issue - Incomplete implementation Xcode

I have searched online and through my code and I can not figure out where my issue is. If someone could assist me I would greatly appreciate it.

SecondViewController.h

#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>

@interface SecondViewController : UIViewController <MFMailComposeViewControllerDelegate>
{}

-(IBAction)twitter:(id)sender;
-(IBAction)facebook:(id)sender;
-(IBAction)Contact:(id)sender;

@end

SecondViewController.m

#import "SecondViewController.h"

@interface SecondViewController ()

@end

@implementation SecondViewController



- (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)Contact {
    MFMailComposeViewController *mailcontroller = [[MFMailComposeViewController alloc] init];
    [mailcontroller setMailComposeDelegate:self];
    NSString *email =@"[email protected]";
    NSArray *emailArray = [[NSArray alloc] initWithObjects:email, nil];
    [mailcontroller setToRecipients:emailArray];
    [mailcontroller setSubject:@"Enter Subject Here"];
    [self presentViewController:mailcontroller animated:YES completion:nil]; }

-(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error{ [self dismissViewControllerAnimated:YES completion:nil];
}

@end

I'm fairly new to programming for the iPhone. So, please excuse me for not fully understanding this issue.

like image 984
user1777808 Avatar asked Aug 26 '26 02:08

user1777808


1 Answers

Xcode will tell you what you're missing. Choose View > Navigators > Show Issue Navigator, then turn down all of the disclosure triangles:

incomplete implementation

Note that you declared a method named Contact:, but you implemented a method named Contact. The colon is part of the method name. You can't omit it.

like image 197
rob mayoff Avatar answered Aug 28 '26 15:08

rob mayoff