Skip to content

Commit 62c16f5

Browse files
committed
minor, just showing how Objective-C can see Swift
1 parent 99fe35f commit 62c16f5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

bk1ch14Appendix/Appendix/Thing.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22

33
#import "Thing.h"
4+
#import "Appendix-Swift.h"
45

56
void setState (State s) {
67
NSLog(@"%d",s);
@@ -21,4 +22,8 @@ - (nullable NSString*) goodMethod: (NSString*) s {
2122
return @[@"Mannie", @"Moe", @"Jack"];
2223
}
2324

25+
- (void) justTesting {
26+
Womble* womble = [[Womble alloc] init];
27+
}
28+
2429
@end

bk1ch14Appendix/Appendix/ViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ struct Pair {
2828
let y : Int
2929
}
3030

31+
class Womble : NSObject {
32+
override init() {
33+
super.init()
34+
}
35+
}
36+
3137

3238
class ViewController: UIViewController {
3339

0 commit comments

Comments
 (0)