Created
October 4, 2017 07:24
-
-
Save izzuddin91/b15b1a6731e9f5b805b189ae17f2a3b0 to your computer and use it in GitHub Desktop.
one-to-one relationship
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| #import "BNRTest.h" | |
| @interface BNRHelp : NSObject | |
| { | |
| NSString *_helpName; | |
| } | |
| @property (nonatomic) NSString *luar; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| #import "BNRHelp.h" | |
| @implementation BNRHelp : NSObject | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| @class BNRHelp; | |
| @interface BNRTest : NSObject | |
| { | |
| NSString *_testname; | |
| } | |
| @property (nonatomic) BNRHelp *help; | |
| //- (void)setTestName:(NSString *)test; | |
| // | |
| //- (NSString *)returnTest; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| #import "BNRTest.h" | |
| @implementation BNRTest : NSObject | |
| //- (void)setTestName:(NSString *)test{ | |
| // | |
| // _testname = test; | |
| //} | |
| // | |
| //- (NSString *)returnTest{ | |
| // return _testname; | |
| //} | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // main.m | |
| // VowelCounter | |
| // | |
| // Created by izzuddin on 02/10/2017. | |
| // Copyright © 2017 izzuddin. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| #import "BNRVowelCounting.h" | |
| #import "BNRTest.h" | |
| #import "BNRHelp.h" | |
| int main(int argc, const char * argv[]) { | |
| @autoreleasepool { | |
| BNRTest *tess = [[ BNRTest alloc ] init ]; | |
| [tess setValue:@"testname" forKey:@"testname"]; | |
| BNRHelp *help = [[BNRHelp alloc]init]; | |
| [help setValue:@"dsasdasdsa" forKey:@"helpName"]; | |
| [help setLuar:@"asdasddasdasd"]; | |
| [tess setHelp:help]; | |
| NSString *abuden = tess.help.luar; | |
| NSLog(@"%@", abuden); | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment