diff --git a/MMTabBarView Demo/MMTabBarView Demo/en.lproj/MainMenu.xib b/MMTabBarView Demo/MMTabBarView Demo/en.lproj/MainMenu.xib
index c4b8c85f..24ed8b52 100644
--- a/MMTabBarView Demo/MMTabBarView Demo/en.lproj/MainMenu.xib
+++ b/MMTabBarView Demo/MMTabBarView Demo/en.lproj/MainMenu.xib
@@ -1,3565 +1,676 @@
-
-
- 1070
- 11E53
- 2549
- 1138.47
- 569.00
-
-
- NSCustomObject
- NSMenu
- NSMenuItem
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- DemoWindowController
- NSWindowController
-
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
-
-
-
- addNewTab:
- id
-
-
- closeTab:
- id
-
-
- configAddTabButton:
- id
-
-
- configAllowBackgroundClosing:
- id
-
-
- configAllowsScrubbing:
- id
-
-
- configAutomaticallyAnimates:
- id
-
-
- configCanCloseOnlyTab:
- id
-
-
- configDisableTabClose:
- id
-
-
- configHideForSingleTab:
- id
-
-
- configOrientation:
- id
-
-
- configStyle:
- id
-
-
- configTabMaxWidth:
- id
-
-
- configTabMinWidth:
- id
-
-
- configTabOptimumWidth:
- id
-
-
- configTabSizeToFit:
- id
-
-
- configTearOffStyle:
- id
-
-
- configUseOverflowMenu:
- id
-
-
- hasCloseButtonAction:
- id
-
-
- hasLargeImageAction:
- id
-
-
- isEditedAction:
- id
-
-
- isProcessingAction:
- id
-
-
- setIconNamed:
- id
-
-
- setObjectCount:
- id
-
-
- setTabLabel:
- id
-
-
- toggleToolbar:
- id
-
-
-
- NSButton
- NSButton
- NSButton
- NSButton
- NSButton
- NSButton
- NSButton
- NSButton
- NSButton
- NSDrawer
- NSButton
- NSButton
- NSPopUpButton
- NSButton
- NSButton
- NSTextField
- NSPopUpButton
- NSPopUpButton
- NSPopUpButton
- MMTabBarControl
- NSTextField
- NSTabView
- NSTextField
- NSTextField
- NSTextField
-
-
-
- button_allowBackgroundClosing
- NSButton
-
-
- button_allowScrubbing
- NSButton
-
-
- button_automaticallyAnimate
- NSButton
-
-
- button_canCloseOnlyTab
- NSButton
-
-
- button_disableTabClosing
- NSButton
-
-
- button_hideForSingleTab
- NSButton
-
-
- button_showAddTab
- NSButton
-
-
- button_sizeToFit
- NSButton
-
-
- button_useOverflow
- NSButton
-
-
- drawer
- NSDrawer
-
-
- hasCloserButton
- NSButton
-
-
- hasLargeImageButton
- NSButton
-
-
- iconButton
- NSPopUpButton
-
-
- isEditedButton
- NSButton
-
-
- isProcessingButton
- NSButton
-
-
- objectCounterField
- NSTextField
-
-
- popUp_orientation
- NSPopUpButton
-
-
- popUp_style
- NSPopUpButton
-
-
- popUp_tearOff
- NSPopUpButton
-
-
- tabBar
- MMTabBarControl
-
-
- tabField
- NSTextField
-
-
- tabView
- NSTabView
-
-
- textField_maxWidth
- NSTextField
-
-
- textField_minWidth
- NSTextField
-
-
- textField_optimumWidth
- NSTextField
-
-
-
- IBProjectSource
- ./Classes/DemoWindowController.h
-
-
-
- MMAppDelegate
- NSObject
-
- window
- NSWindow
-
-
- window
-
- window
- NSWindow
-
-
-
- IBProjectSource
- ./Classes/MMAppDelegate.h
-
-
-
- NSDocument
-
- id
- id
- id
- id
- id
- id
-
-
-
- printDocument:
- id
-
-
- revertDocumentToSaved:
- id
-
-
- runPageLayout:
- id
-
-
- saveDocument:
- id
-
-
- saveDocumentAs:
- id
-
-
- saveDocumentTo:
- id
-
-
-
- IBProjectSource
- ./Classes/NSDocument.h
-
-
-
-
- 0
- IBCocoaFramework
- YES
- 3
-
- {11, 11}
- {10, 3}
-
- YES
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MMTabBarView/MMTabBarView.xcodeproj/project.pbxproj b/MMTabBarView/MMTabBarView.xcodeproj/project.pbxproj
index 73a6c115..ba27b2d2 100644
--- a/MMTabBarView/MMTabBarView.xcodeproj/project.pbxproj
+++ b/MMTabBarView/MMTabBarView.xcodeproj/project.pbxproj
@@ -885,6 +885,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = 06DB239A1609F5820071BDA0;
diff --git a/MMTabBarView/MMTabBarView/MMAttachedTabBarButtonCell.h b/MMTabBarView/MMTabBarView/MMAttachedTabBarButtonCell.h
index 2eb607c1..83021935 100644
--- a/MMTabBarView/MMTabBarView/MMAttachedTabBarButtonCell.h
+++ b/MMTabBarView/MMTabBarView/MMAttachedTabBarButtonCell.h
@@ -18,13 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
/**
* The control view
- *
- * TODO: fix, rename "attachedTabBarButton"
*/
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wincompatible-property-type"
-@property (assign) MMAttachedTabBarButton *controlView;
-#pragma clang diagnostic pop
+@property (nullable, weak) MMAttachedTabBarButton *attachedTabBarButton;
@end
diff --git a/MMTabBarView/MMTabBarView/MMAttachedTabBarButtonCell.m b/MMTabBarView/MMTabBarView/MMAttachedTabBarButtonCell.m
index ca3da5ee..55604a6f 100644
--- a/MMTabBarView/MMTabBarView/MMAttachedTabBarButtonCell.m
+++ b/MMTabBarView/MMTabBarView/MMAttachedTabBarButtonCell.m
@@ -24,12 +24,15 @@ - (instancetype)init {
#pragma mark -
#pragma mark Properties
-- (MMAttachedTabBarButton *)controlView {
- return (MMAttachedTabBarButton *)[super controlView];
+- (nullable MMAttachedTabBarButton *)controlView {
+ // return (MMAttachedTabBarButton *)[super controlView];
+ return _attachedTabBarButton;
}
-- (void)setControlView:(MMAttachedTabBarButton *)aView {
- [super setControlView:aView];
+- (void) setControlView:(nullable NSView *)aView
+{
+ [super setControlView:aView];
+ _attachedTabBarButton = (MMAttachedTabBarButton*)aView;
}
#pragma mark -
diff --git a/MMTabBarView/MMTabBarView/MMTabBarButtonCell.h b/MMTabBarView/MMTabBarView/MMTabBarButtonCell.h
index c68d9e58..f6fd4754 100644
--- a/MMTabBarView/MMTabBarView/MMTabBarButtonCell.h
+++ b/MMTabBarView/MMTabBarView/MMTabBarButtonCell.h
@@ -36,18 +36,13 @@ NS_ASSUME_NONNULL_BEGIN
/**
* The control view
- *
- * TODO: fix, rename "tabBarButton"
*/
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wincompatible-property-type"
-@property (assign) MMTabBarButton *controlView;
-#pragma clang diagnostic pop
+@property (nullable, weak) MMTabBarButton *tabBarButton;
/**
* Tab bar view the tab bar button belongs to
*/
-@property (readonly) MMTabBarView *tabBarView;
+@property (nullable, readonly) MMTabBarView *tabBarView;
#pragma mark Update images
@@ -118,14 +113,14 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Get progress indicator
*/
-@property (readonly) MMProgressIndicator *indicator;
+@property (nullable, readonly) MMProgressIndicator *indicator;
#pragma mark Close Button Support
/**
* The close button
*/
-@property (readonly) MMRolloverButton *closeButton;
+@property (nullable, readonly) MMRolloverButton *closeButton;
/**
* Check if receiver should display close button
diff --git a/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m b/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m
index cc365e9d..8d9fcc24 100644
--- a/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m
+++ b/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m
@@ -53,16 +53,18 @@ - (instancetype)init {
return self;
}
-- (MMTabBarButton *)controlView {
- return (MMTabBarButton *)[super controlView];
+- (nullable MMTabBarButton *)controlView {
+ // return (MMTabBarButton *)[super controlView];
+ return _tabBarButton;
}
-- (void)setControlView:(MMTabBarButton *)aView {
- [super setControlView:aView];
+- (void)setControlView:(nullable NSView *)aView {
+ _tabBarButton = (MMTabBarButton*) aView;
+ [super setControlView:aView];
}
-- (MMTabBarView *)tabBarView {
- return self.controlView.tabBarView;
+- (nullable MMTabBarView *)tabBarView {
+ return _tabBarButton.tabBarView;
}
- (void)calcDrawInfo:(NSRect)aRect {
@@ -183,15 +185,15 @@ - (void)setState:(NSInteger)value {
#pragma mark -
#pragma mark Progress Indicator Support
-- (MMProgressIndicator *)indicator {
- return self.controlView.indicator;
+- (nullable MMProgressIndicator *)indicator {
+ return self.tabBarButton.indicator;
}
#pragma mark -
#pragma mark Close Button Support
-- (MMRolloverButton *)closeButton {
- return self.controlView.closeButton;
+- (nullable MMRolloverButton *)closeButton {
+ return self.tabBarButton.closeButton;
}
- (NSImage *)closeButtonImageOfType:(MMCloseButtonImageType)type {
@@ -612,7 +614,7 @@ - (NSImage *)_closeButtonImageOfType:(MMCloseButtonImageType)type {
- (void)_updateCloseButton {
MMTabBarView *tabBarView = self.tabBarView;
- MMTabBarButton *button = self.controlView;
+ MMTabBarButton *button = self.tabBarButton;
MMRolloverButton *closeButton = button.closeButton;
[self _updateCloseButtonImages];
@@ -643,7 +645,7 @@ - (void)_updateCloseButton {
- (void)_updateIndicator {
MMTabBarView *tabBarView = self.tabBarView;
- MMTabBarButton *button = self.controlView;
+ MMTabBarButton *button = self.tabBarButton;
MMProgressIndicator *indicator = button.indicator;
// adjust visibility and position of process indicator
diff --git a/MMTabBarView/MMTabBarView/MMTabBarView.m b/MMTabBarView/MMTabBarView/MMTabBarView.m
index 043ff210..95d5e012 100755
--- a/MMTabBarView/MMTabBarView/MMTabBarView.m
+++ b/MMTabBarView/MMTabBarView/MMTabBarView.m
@@ -204,15 +204,20 @@ - (void)viewDidMoveToWindow {
}
- (void)viewWillStartLiveResize {
+ [super viewWillStartLiveResize];
for (MMAttachedTabBarButton *aButton in self.attachedButtons) {
[aButton.indicator stopAnimation:self];
}
- [self setNeedsDisplay:YES];
}
-(void)viewDidEndLiveResize {
+ for (MMAttachedTabBarButton *aButton in self.attachedButtons) {
+ [aButton.indicator performSelector:@selector(startAnimation:) withObject:nil afterDelay:0.0];
+ }
+
[self _checkWindowFrame];
[self update:NO];
+ [super viewDidEndLiveResize];
}
- (void)resetCursorRects {
diff --git a/MMTabBarView/MMTabBarView/Styles/Mojave Tab Style/MMMojaveTabStyle.m b/MMTabBarView/MMTabBarView/Styles/Mojave Tab Style/MMMojaveTabStyle.m
index 19827b3d..08b1a67d 100755
--- a/MMTabBarView/MMTabBarView/Styles/Mojave Tab Style/MMMojaveTabStyle.m
+++ b/MMTabBarView/MMTabBarView/Styles/Mojave Tab Style/MMMojaveTabStyle.m
@@ -162,7 +162,7 @@ - (NSAttributedString *)attributedStringValueForTabCell:(MMTabBarButtonCell *)ce
// Figure out correct text color
- if ( cell.controlView.state == NSOnState )
+ if ( cell.tabBarButton.state == NSOnState )
{
textColor = [self colorForPart:MMMtabSelectedFont ofTabBarView:cell.tabBarView];
}