Bladeren bron

【OCToSwift】WaitingView

tangchao 1 jaar geleden
bovenliggende
commit
d8ab44212d

+ 0 - 10
PDF Office/PDF Master.xcodeproj/project.pbxproj

@@ -2791,9 +2791,6 @@
 		BB98080029CA93D400BEEB81 /* WelcomeWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB9807FC29CA93D400BEEB81 /* WelcomeWindowController.xib */; };
 		BB98080129CA93D400BEEB81 /* WelcomeWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB9807FC29CA93D400BEEB81 /* WelcomeWindowController.xib */; };
 		BB98080229CA93D400BEEB81 /* WelcomeWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB9807FC29CA93D400BEEB81 /* WelcomeWindowController.xib */; };
-		BB98080529CA945F00BEEB81 /* WaitingView.m in Sources */ = {isa = PBXBuildFile; fileRef = BB98080429CA945F00BEEB81 /* WaitingView.m */; };
-		BB98080629CA945F00BEEB81 /* WaitingView.m in Sources */ = {isa = PBXBuildFile; fileRef = BB98080429CA945F00BEEB81 /* WaitingView.m */; };
-		BB98080729CA945F00BEEB81 /* WaitingView.m in Sources */ = {isa = PBXBuildFile; fileRef = BB98080429CA945F00BEEB81 /* WaitingView.m */; };
 		BB981E4D2AD4E11E001988CA /* KMPageIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB981E4C2AD4E11E001988CA /* KMPageIndicator.swift */; };
 		BB981E4E2AD4E11E001988CA /* KMPageIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB981E4C2AD4E11E001988CA /* KMPageIndicator.swift */; };
 		BB981E4F2AD4E11E001988CA /* KMPageIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB981E4C2AD4E11E001988CA /* KMPageIndicator.swift */; };
@@ -4589,8 +4586,6 @@
 		BB9807FA29CA93D400BEEB81 /* WelcomeWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WelcomeWindowController.m; sourceTree = "<group>"; };
 		BB9807FB29CA93D400BEEB81 /* WelcomeWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelcomeWindowController.h; sourceTree = "<group>"; };
 		BB9807FC29CA93D400BEEB81 /* WelcomeWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WelcomeWindowController.xib; sourceTree = "<group>"; };
-		BB98080329CA945F00BEEB81 /* WaitingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaitingView.h; sourceTree = "<group>"; };
-		BB98080429CA945F00BEEB81 /* WaitingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WaitingView.m; sourceTree = "<group>"; };
 		BB981E4C2AD4E11E001988CA /* KMPageIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPageIndicator.swift; sourceTree = "<group>"; };
 		BB99ACC0292DE22E0048AFD9 /* KMMergeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMMergeViewController.swift; sourceTree = "<group>"; };
 		BB99ACC1292DE22E0048AFD9 /* KMMergeViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMMergeViewController.xib; sourceTree = "<group>"; };
@@ -8070,8 +8065,6 @@
 			isa = PBXGroup;
 			children = (
 				BB981E4C2AD4E11E001988CA /* KMPageIndicator.swift */,
-				BB98080329CA945F00BEEB81 /* WaitingView.h */,
-				BB98080429CA945F00BEEB81 /* WaitingView.m */,
 				9FCFEC932AD12EE800EAD2CB /* KMCoverButton.swift */,
 			);
 			path = Control;
@@ -10561,7 +10554,6 @@
 				9FA693A82987C0590055488A /* KMStepperView.swift in Sources */,
 				BBAFC84A298519F700D0648E /* KMSavePanelAccessoryController.m in Sources */,
 				BBC745F2295F0DD00072C2ED /* KMCropSettingPageSizeView.swift in Sources */,
-				BB98080529CA945F00BEEB81 /* WaitingView.m in Sources */,
 				ADCB98E12924776F00B51A03 /* KMBatchProcessingSizeTableCell.swift in Sources */,
 				F3599222292CA27B000D25DE /* CPDFListViewRuntime.m in Sources */,
 				BB0A55182A3074F400B6E84B /* KMHoverView.swift in Sources */,
@@ -11362,7 +11354,6 @@
 				9FA693A92987C0590055488A /* KMStepperView.swift in Sources */,
 				BBAFC84B298519F700D0648E /* KMSavePanelAccessoryController.m in Sources */,
 				BBC745F3295F0DD00072C2ED /* KMCropSettingPageSizeView.swift in Sources */,
-				BB98080629CA945F00BEEB81 /* WaitingView.m in Sources */,
 				9F8DDF2E2924B855006CDC73 /* KMPDFToolsViewController.swift in Sources */,
 				9F0CB4C5298625F400007028 /* NSColor+KMExtensions.swift in Sources */,
 				AD4B454E294072B90076FA14 /* KMOCRWindowController.swift in Sources */,
@@ -12721,7 +12712,6 @@
 				ADD1B70C29471FA500C3FFF7 /* KMPrintChoosePresenter.swift in Sources */,
 				ADCB98E32924776F00B51A03 /* KMBatchProcessingSizeTableCell.swift in Sources */,
 				9F0CB4692967E5CB00007028 /* KMPropertiesPanelSubViewController.swift in Sources */,
-				BB98080729CA945F00BEEB81 /* WaitingView.m in Sources */,
 				9FBC48C1299E23B100CA39D7 /* NSViewController+DesignToken.swift in Sources */,
 				89752DF429389F82003FF08E /* KMToolbarItem.m in Sources */,
 				ADDEEA742AD3EFE200EF675D /* KMButton.swift in Sources */,

+ 0 - 16
PDF Office/PDF Master/Class/Common/OC/Control/WaitingView.h

@@ -1,16 +0,0 @@
-//
-//  WaitingView.h
-//  NoteLedge for Mac
-//
-//  Created by kdanmobile on 14-3-31.
-//  Copyright (c) 2014年 kdanmobile. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-@interface WaitingView : NSView
-{
-    NSProgressIndicator             *_indicator;
-}
-- (void)startAnimation;
-@end

+ 0 - 68
PDF Office/PDF Master/Class/Common/OC/Control/WaitingView.m

@@ -1,68 +0,0 @@
-//
-//  WaitingView.m
-//  NoteLedge for Mac
-//
-//  Created by kdanmobile on 14-3-31.
-//  Copyright (c) 2014年 kdanmobile. All rights reserved.
-//
-
-#import "WaitingView.h"
-@implementation NSView (Centering)
-
-- (void) center {
-    
-    if (![self superview]) return;
-    
-    [self setFrame:NSMakeRect(
-                              
-                              0.5 * ([self superview].frame.size.width - self.frame.size.width),
-                              0.5 * ([self superview].frame.size.height - self.frame.size.height),
-                              
-                              self.frame.size.width, 
-                              self.frame.size.height
-                              
-                              )];
-    
-}
-
-@end
-@implementation WaitingView
-
-- (id)initWithFrame:(NSRect)frame
-{
-    self = [super initWithFrame:frame];
-    if (self) {
-        _indicator = [[NSProgressIndicator alloc] init];
-        [_indicator setBezeled:NO];
-        [_indicator setAutoresizingMask:63];
-        [_indicator setStyle:NSProgressIndicatorSpinningStyle];
-        [_indicator setControlSize:NSRegularControlSize];
-        [_indicator setUsesThreadedAnimation:YES];
-        [_indicator sizeToFit];
-       
-        [self addSubview:_indicator];
-         [_indicator center];
-    }
-    return self;
-}
-
-- (void)startAnimation
-{
-    [_indicator startAnimation:nil];
-}
-- (void)drawRect:(NSRect)dirtyRect
-{
-	[[NSColor colorWithCalibratedRed:1.0 green:1.0 blue:1.0 alpha:0.5] set];
-    [NSBezierPath fillRect:self.bounds];
-}
-
-- (void)mouseDown:(NSEvent *)theEvent
-{
-    
-}
-- (void)mouseUp:(NSEvent *)theEvent
-{
-    
-}
-
-@end

+ 0 - 18
PDF Office/PDF Master/Class/Welcome/OC/WelcomeWindowController.m

@@ -7,7 +7,6 @@
 //
 
 #import "WelcomeWindowController.h"
-#import "WaitingView.h"
 #import <PDF_Master-Swift.h>
 
 static WelcomeWindowController *windowController = nil;
@@ -389,23 +388,6 @@ static NSString * const kKMWelcomeRemindMeLaterKey = @"WelcomeRemindMeLaterKey";
     }
 }
 
-- (void)addWaingView:(NSView *)view {
-    [self removeWaitingView:view];
-    WaitingView *wView = [[WaitingView alloc] initWithFrame:view.bounds];
-    [wView setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
-    [view addSubview:wView];
-    [wView startAnimation];
-}
-
-- (void)removeWaitingView:(NSView *)view {
-    for (id v in view.subviews) {
-        if ([[v class] isSubclassOfClass:[WaitingView class]]) {
-            [v removeFromSuperview];
-            break;
-        }
-    }
-}
-
 #pragma mark Button Actions
 
 - (IBAction)previousButtonAction:(id)sender {