Skip to content

Commit 658a980

Browse files
authored
Merge pull request MiMo42#33 from Eitot/spm-fix
Add missing header to SPM public header and insert NSBundle macro
2 parents 58c9333 + 3a574dd commit 658a980

4 files changed

Lines changed: 10 additions & 11 deletions

File tree

MMTabBarView/MMTabBarView/MMOverflowPopUpButton.m

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,10 @@
99
#import "MMOverflowPopUpButton.h"
1010

1111
#import "MMOverflowPopUpButtonCell.h"
12-
// #import "MMTabBarView.h"
12+
#import "MMTabBarView.h"
1313

1414
NS_ASSUME_NONNULL_BEGIN
1515

16-
#define StaticImage(name) \
17-
static NSImage* _static##name##Image() \
18-
{ \
19-
static NSImage* image = nil; \
20-
if (!image) \
21-
image = [[NSBundle bundleForClass:MMOverflowPopUpButtonCell.class] imageForResource:@#name]; \
22-
return image; \
23-
}
24-
2516
@interface MMOverflowPopUpButton ()
2617

2718
@property (assign) CGFloat secondImageAlpha;

MMTabBarView/MMTabBarView/MMTabBarView.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,11 @@ + (NSBundle *)bundle;
258258
{
259259
static NSBundle *bundle = nil;
260260
if (!bundle) {
261-
bundle = [NSBundle bundleForClass:MMTabBarView.class];
261+
#ifdef SWIFTPM_MODULE_BUNDLE
262+
bundle = SWIFTPM_MODULE_BUNDLE;
263+
#else
264+
bundle = [NSBundle bundleForClass:MMTabBarView.class];
265+
#endif
262266
}
263267
return bundle;
264268
}

MMTabBarView/MMTabBarView/include/MMTarBarStyle-SPM.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#import "../MMTabBarButtonCell.h"
2626
#import "../MMTabBarItem.h"
2727
#import "../MMTabBarView.Globals.h"
28+
#import "../MMTabBarView.h"
2829
#import "../MMTabStyle.h"
2930
#import "../MMUnifiedTabStyle.h"
3031
#import "../MMYosemiteTabStyle.h"

Package.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import PackageDescription
55
let package = Package(
66
name: "MMTabBarView",
77
defaultLocalization: LanguageTag("en"),
8+
platforms: [
9+
.macOS(.v10_10),
10+
],
811
products: [
912
.library(name: "MMTabBarView", targets: ["MMTabBarView"]),
1013
],

0 commit comments

Comments
 (0)