Skip to content

Commit

Permalink
complete
Browse files Browse the repository at this point in the history
  • Loading branch information
wangweicheng authored and wangweicheng committed Nov 16, 2017
1 parent f37b57f commit 40f115a
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 79 deletions.
15 changes: 0 additions & 15 deletions Clock/Clock.h

This file was deleted.

2 changes: 1 addition & 1 deletion Example/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ @implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
// Clock *clock = [[Clock alloc] initWithFrame:window isPreview:YES];
// Sundial *Sundial = [[Sundial alloc] initWithFrame:window isPreview:YES];
}


Expand Down
12 changes: 6 additions & 6 deletions Example/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//

#import "ViewController.h"
#import "Clock.h"
#import "Sundial.h"

@interface ViewController()

@property (nonatomic, strong) Clock *clock;
@property (nonatomic, strong) Sundial *Sundial;

@end

Expand All @@ -20,10 +20,10 @@ @implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];

self.clock = [[Clock alloc] initWithFrame:self.view.bounds isPreview:YES];
[self.clock setAutoresizingMask:NSViewHeightSizable|NSViewWidthSizable];
[self.view addSubview:self.clock];
[self.clock startAnimation];
self.Sundial = [[Sundial alloc] initWithFrame:self.view.bounds isPreview:YES];
[self.Sundial setAutoresizingMask:NSViewHeightSizable|NSViewWidthSizable];
[self.view addSubview:self.Sundial];
[self.Sundial startAnimation];

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
BC6B62F01FB9C2D7002AD625 /* Clock.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6B62EE1FB9C2D7002AD625 /* Clock.m */; };
BC6B62F01FB9C2D7002AD625 /* Sundial.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6B62EE1FB9C2D7002AD625 /* Sundial.m */; };
BC6B62FB1FBA94E0002AD625 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6B62FA1FBA94E0002AD625 /* AppDelegate.m */; };
BC6B62FE1FBA94E0002AD625 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6B62FD1FBA94E0002AD625 /* ViewController.m */; };
BC6B63001FBA94E0002AD625 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BC6B62FF1FBA94E0002AD625 /* Assets.xcassets */; };
Expand All @@ -19,10 +19,10 @@
BC6B63151FBAF302002AD625 /* NSBezierPath+quartz.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6B63131FBAF302002AD625 /* NSBezierPath+quartz.m */; };
BC6B63181FBB099D002AD625 /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC6B63171FBB0994002AD625 /* ScreenSaver.framework */; };
BC6B631A1FBB09C1002AD625 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC6B63191FBB09BE002AD625 /* Quartz.framework */; };
BC6B631D1FBB0B61002AD625 /* Clock.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6B62ED1FB9C2D7002AD625 /* Clock.h */; settings = {ATTRIBUTES = (Public, ); }; };
BC6B631D1FBB0B61002AD625 /* Sundial.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6B62ED1FB9C2D7002AD625 /* Sundial.h */; settings = {ATTRIBUTES = (Public, ); }; };
BC6B631F1FBB0DF9002AD625 /* NSBezierPath+quartz.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6B63131FBAF302002AD625 /* NSBezierPath+quartz.m */; };
BC6B63251FBB2EB3002AD625 /* DialView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6B630C1FBAA5E0002AD625 /* DialView.m */; };
BC6B632B1FBB4E3E002AD625 /* Clock.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6B62EE1FB9C2D7002AD625 /* Clock.m */; };
BC6B632B1FBB4E3E002AD625 /* Sundial.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6B62EE1FB9C2D7002AD625 /* Sundial.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -36,10 +36,10 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
BC6B62AD1FB9BFD5002AD625 /* Clock.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Clock.saver; sourceTree = BUILT_PRODUCTS_DIR; };
BC6B62AD1FB9BFD5002AD625 /* Sundial.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Sundial.saver; sourceTree = BUILT_PRODUCTS_DIR; };
BC6B62B41FB9BFD5002AD625 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BC6B62ED1FB9C2D7002AD625 /* Clock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Clock.h; sourceTree = "<group>"; };
BC6B62EE1FB9C2D7002AD625 /* Clock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Clock.m; sourceTree = "<group>"; };
BC6B62ED1FB9C2D7002AD625 /* Sundial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sundial.h; sourceTree = "<group>"; };
BC6B62EE1FB9C2D7002AD625 /* Sundial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Sundial.m; sourceTree = "<group>"; };
BC6B62F71FBA94E0002AD625 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
BC6B62F91FBA94E0002AD625 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
BC6B62FA1FBA94E0002AD625 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -81,7 +81,7 @@
BC6B62A31FB9BFD5002AD625 = {
isa = PBXGroup;
children = (
BC6B62AF1FB9BFD5002AD625 /* Clock */,
BC6B62AF1FB9BFD5002AD625 /* Sundial */,
BC6B62F81FBA94E0002AD625 /* Example */,
BC6B62AE1FB9BFD5002AD625 /* Products */,
BC6B63161FBB0994002AD625 /* Frameworks */,
Expand All @@ -91,24 +91,24 @@
BC6B62AE1FB9BFD5002AD625 /* Products */ = {
isa = PBXGroup;
children = (
BC6B62AD1FB9BFD5002AD625 /* Clock.saver */,
BC6B62AD1FB9BFD5002AD625 /* Sundial.saver */,
BC6B62F71FBA94E0002AD625 /* Example.app */,
);
name = Products;
sourceTree = "<group>";
};
BC6B62AF1FB9BFD5002AD625 /* Clock */ = {
BC6B62AF1FB9BFD5002AD625 /* Sundial */ = {
isa = PBXGroup;
children = (
BC6B62ED1FB9C2D7002AD625 /* Clock.h */,
BC6B62EE1FB9C2D7002AD625 /* Clock.m */,
BC6B62ED1FB9C2D7002AD625 /* Sundial.h */,
BC6B62EE1FB9C2D7002AD625 /* Sundial.m */,
BC6B62B41FB9BFD5002AD625 /* Info.plist */,
BC6B630B1FBAA5E0002AD625 /* DialView.h */,
BC6B630C1FBAA5E0002AD625 /* DialView.m */,
BC6B63121FBAF302002AD625 /* NSBezierPath+quartz.h */,
BC6B63131FBAF302002AD625 /* NSBezierPath+quartz.m */,
);
path = Clock;
path = Sundial;
sourceTree = "<group>";
};
BC6B62F81FBA94E0002AD625 /* Example */ = {
Expand Down Expand Up @@ -143,7 +143,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
BC6B631D1FBB0B61002AD625 /* Clock.h in Headers */,
BC6B631D1FBB0B61002AD625 /* Sundial.h in Headers */,
BC6B63141FBAF302002AD625 /* NSBezierPath+quartz.h in Headers */,
BC6B630D1FBAA5E0002AD625 /* DialView.h in Headers */,
);
Expand All @@ -152,9 +152,9 @@
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
BC6B62AC1FB9BFD5002AD625 /* Clock */ = {
BC6B62AC1FB9BFD5002AD625 /* Sundial */ = {
isa = PBXNativeTarget;
buildConfigurationList = BC6B62B71FB9BFD5002AD625 /* Build configuration list for PBXNativeTarget "Clock" */;
buildConfigurationList = BC6B62B71FB9BFD5002AD625 /* Build configuration list for PBXNativeTarget "Sundial" */;
buildPhases = (
BC6B62A81FB9BFD5002AD625 /* Sources */,
BC6B62A91FB9BFD5002AD625 /* Frameworks */,
Expand All @@ -166,9 +166,9 @@
);
dependencies = (
);
name = Clock;
name = Sundial;
productName = Clock;
productReference = BC6B62AD1FB9BFD5002AD625 /* Clock.saver */;
productReference = BC6B62AD1FB9BFD5002AD625 /* Sundial.saver */;
productType = "com.apple.product-type.bundle";
};
BC6B62F61FBA94E0002AD625 /* Example */ = {
Expand Down Expand Up @@ -208,7 +208,7 @@
};
};
};
buildConfigurationList = BC6B62A71FB9BFD5002AD625 /* Build configuration list for PBXProject "Clock" */;
buildConfigurationList = BC6B62A71FB9BFD5002AD625 /* Build configuration list for PBXProject "Sundial" */;
compatibilityVersion = "Xcode 8.0";
developmentRegion = en;
hasScannedForEncodings = 0;
Expand All @@ -221,7 +221,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
BC6B62AC1FB9BFD5002AD625 /* Clock */,
BC6B62AC1FB9BFD5002AD625 /* Sundial */,
BC6B62F61FBA94E0002AD625 /* Example */,
);
};
Expand Down Expand Up @@ -267,7 +267,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BC6B62F01FB9C2D7002AD625 /* Clock.m in Sources */,
BC6B62F01FB9C2D7002AD625 /* Sundial.m in Sources */,
BC6B63151FBAF302002AD625 /* NSBezierPath+quartz.m in Sources */,
BC6B630E1FBAA5E0002AD625 /* DialView.m in Sources */,
);
Expand All @@ -277,7 +277,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BC6B632B1FBB4E3E002AD625 /* Clock.m in Sources */,
BC6B632B1FBB4E3E002AD625 /* Sundial.m in Sources */,
BC6B63251FBB2EB3002AD625 /* DialView.m in Sources */,
BC6B631F1FBB0DF9002AD625 /* NSBezierPath+quartz.m in Sources */,
BC6B62FE1FBA94E0002AD625 /* ViewController.m in Sources */,
Expand All @@ -291,7 +291,7 @@
/* Begin PBXTargetDependency section */
BC6B631C1FBB0A21002AD625 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = BC6B62AC1FB9BFD5002AD625 /* Clock */;
target = BC6B62AC1FB9BFD5002AD625 /* Sundial */;
targetProxy = BC6B631B1FBB0A21002AD625 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
Expand Down Expand Up @@ -417,11 +417,11 @@
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Clock/Info.plist;
INFOPLIST_FILE = Sundial/Info.plist;
INSTALL_PATH = "$(HOME)/Library/Screen Savers";
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = PW.Clock;
PRODUCT_BUNDLE_IDENTIFIER = com.sundial.pw;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = saver;
};
Expand All @@ -433,10 +433,10 @@
ARCHS = "$(ARCHS_STANDARD)";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Clock/Info.plist;
INFOPLIST_FILE = Sundial/Info.plist;
INSTALL_PATH = "$(HOME)/Library/Screen Savers";
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = PW.Clock;
PRODUCT_BUNDLE_IDENTIFIER = com.sundial.pw;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = saver;
};
Expand Down Expand Up @@ -475,7 +475,7 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
BC6B62A71FB9BFD5002AD625 /* Build configuration list for PBXProject "Clock" */ = {
BC6B62A71FB9BFD5002AD625 /* Build configuration list for PBXProject "Sundial" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BC6B62B51FB9BFD5002AD625 /* Debug */,
Expand All @@ -484,7 +484,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BC6B62B71FB9BFD5002AD625 /* Build configuration list for PBXNativeTarget "Clock" */ = {
BC6B62B71FB9BFD5002AD625 /* Build configuration list for PBXNativeTarget "Sundial" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BC6B62B81FB9BFD5002AD625 /* Debug */,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BC6B62AC1FB9BFD5002AD625"
BuildableName = "Clock.saver"
BlueprintName = "Clock"
ReferencedContainer = "container:Clock.xcodeproj">
BuildableName = "Sundial.saver"
BlueprintName = "Sundial"
ReferencedContainer = "container:Sundial.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand Down Expand Up @@ -48,9 +48,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BC6B62AC1FB9BFD5002AD625"
BuildableName = "Clock.saver"
BlueprintName = "Clock"
ReferencedContainer = "container:Clock.xcodeproj">
BuildableName = "Sundial.saver"
BlueprintName = "Sundial"
ReferencedContainer = "container:Sundial.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -66,9 +66,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BC6B62AC1FB9BFD5002AD625"
BuildableName = "Clock.saver"
BlueprintName = "Clock"
ReferencedContainer = "container:Clock.xcodeproj">
BuildableName = "Sundial.saver"
BlueprintName = "Sundial"
ReferencedContainer = "container:Sundial.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
BlueprintIdentifier = "BC6B62F61FBA94E0002AD625"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Clock.xcodeproj">
ReferencedContainer = "container:Sundial.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -36,7 +36,7 @@
BlueprintIdentifier = "BC6B62F61FBA94E0002AD625"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Clock.xcodeproj">
ReferencedContainer = "container:Sundial.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -60,7 +60,7 @@
BlueprintIdentifier = "BC6B62F61FBA94E0002AD625"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Clock.xcodeproj">
ReferencedContainer = "container:Sundial.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
Expand All @@ -79,7 +79,7 @@
BlueprintIdentifier = "BC6B62F61FBA94E0002AD625"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Clock.xcodeproj">
ReferencedContainer = "container:Sundial.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
2 changes: 1 addition & 1 deletion Clock/DialView.h → Sundial/DialView.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// DiallView.h
// Clock
// Sundial
//
// Created by wangweicheng on 2017/11/14.
// Copyright © 2017年 wangweicheng. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion Clock/DialView.m → Sundial/DialView.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// DiallView.m
// Clock
// Sundial
//
// Created by wangweicheng on 2017/11/14.
// Copyright © 2017年 wangweicheng. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion Clock/Info.plist → Sundial/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017年 wangweicheng. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string>Clock.Clock</string>
<string>Sundial.Sundial</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// NSBezierPath+quartz.h
// Clock
// Sundial
//
// Created by wangweicheng on 2017/11/14.
// Copyright © 2017年 wangweicheng. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// NSBezierPath+quartz.m
// Clock
// Sundial
//
// Created by wangweicheng on 2017/11/14.
// Copyright © 2017年 wangweicheng. All rights reserved.
Expand Down
13 changes: 13 additions & 0 deletions Sundial/Sundial.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Sundial.h
// Sundial
//
// Created by wangweicheng on 2017/11/14.
// Copyright © 2017年 wangweicheng. All rights reserved.
//

#import <ScreenSaver/ScreenSaver.h>

@interface Sundial : ScreenSaverView

@end
Loading

0 comments on commit 40f115a

Please sign in to comment.