IPhone : warning: incompatible pointer types sending 'NSString *' to parameter of type 'UIStoryoardSegue *'

on Sunday, February 22, 2015

Trying to do a follow-up project with the TeamTreeHouse iOS objective-c development program. However, the project is implemented in xcode 4 while I use xcode 6... so my results are not quite identical.


I created in my a programatic segue from in my Storyboard from one scene to another.


The segue is named "showLogin" in the identifier of the attribute inspector.


Here is the code in the .m file:



#import "InboxTableViewController.h"

@interface InboxTableViewController ()

@end

@implementation InboxTableViewController

- (void)viewDidLoad {
[super viewDidLoad];
[self prepareForSegue:@"showLogin" sender:self];


}


#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
#warning Potentially incomplete method implementation.
// Return the number of sections.
return 0;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection: (NSInteger)section {
#warning Incomplete method implementation.
// Return the number of rows in the section.
return 0;
}


@end


so my main problem is with the [self prepareForSegue:@"showLogin" sender:self];


the @"showLogin" is underlined in a red dashed line - as it is not recognized.


It give a warning of "incompatible pointer types sending 'NSString *' to parameter of type 'UIStoryoardSegue *' "


Appreciate any help of suggestion, spent so many hours over it...


0 comments:

Post a Comment