I'm just learning Objective-C and have a what I'm sure is a pretty basic question here. This is a function I've created that will simple hold variables from some user input.
- (void)standardDatabaseWithName:(NSString*)name
host:(NSString*)host
username:(NSString*)username
password:(NSString*)password
database:(NSString*)database
port:(NSInteger*)port {
NSString *myName = name;
NSString *myHost = host;
NSString *myUsername = username;
NSString *myPassword = password;
NSString *myDatabase = database;
NSInteger *myPort = port;
}
Below is a seperate function where I want to create a new var with that information and the from there use it was what I need.
- (void)insertStandardConnection {
NSString name = [NewDbModalView standardDatabaseWithName:myName];
NSString host = [NewDbModalView standardDatabaseWithName:myHost];
}
So this attempt didn't work for me. Any advice here guys? At this point I've been left scratching my head.