diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..8d76f35 Binary files /dev/null and b/.DS_Store differ diff --git a/Notch Sim.xcodeproj/project.pbxproj b/Notch Sim.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7172d1d --- /dev/null +++ b/Notch Sim.xcodeproj/project.pbxproj @@ -0,0 +1,346 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + B529DFA4271FB8AE000139B7 /* Notch_SimApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B529DFA3271FB8AE000139B7 /* Notch_SimApp.swift */; }; + B529DFA6271FB8AE000139B7 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B529DFA5271FB8AE000139B7 /* ContentView.swift */; }; + B529DFA8271FB8B0000139B7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B529DFA7271FB8B0000139B7 /* Assets.xcassets */; }; + B529DFAB271FB8B0000139B7 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B529DFAA271FB8B0000139B7 /* Preview Assets.xcassets */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + B529DFA0271FB8AE000139B7 /* Notch Sim.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Notch Sim.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + B529DFA3271FB8AE000139B7 /* Notch_SimApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notch_SimApp.swift; sourceTree = ""; }; + B529DFA5271FB8AE000139B7 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + B529DFA7271FB8B0000139B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B529DFAA271FB8B0000139B7 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + B529DFAC271FB8B0000139B7 /* Notch_Sim.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Notch_Sim.entitlements; sourceTree = ""; }; + B529DFB2271FBE32000139B7 /* Notch-Sim-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "Notch-Sim-Info.plist"; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B529DF9D271FB8AE000139B7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B529DF97271FB8AE000139B7 = { + isa = PBXGroup; + children = ( + B529DFA2271FB8AE000139B7 /* Notch Sim */, + B529DFA1271FB8AE000139B7 /* Products */, + ); + sourceTree = ""; + }; + B529DFA1271FB8AE000139B7 /* Products */ = { + isa = PBXGroup; + children = ( + B529DFA0271FB8AE000139B7 /* Notch Sim.app */, + ); + name = Products; + sourceTree = ""; + }; + B529DFA2271FB8AE000139B7 /* Notch Sim */ = { + isa = PBXGroup; + children = ( + B529DFB2271FBE32000139B7 /* Notch-Sim-Info.plist */, + B529DFA3271FB8AE000139B7 /* Notch_SimApp.swift */, + B529DFA5271FB8AE000139B7 /* ContentView.swift */, + B529DFA7271FB8B0000139B7 /* Assets.xcassets */, + B529DFAC271FB8B0000139B7 /* Notch_Sim.entitlements */, + B529DFA9271FB8B0000139B7 /* Preview Content */, + ); + path = "Notch Sim"; + sourceTree = ""; + }; + B529DFA9271FB8B0000139B7 /* Preview Content */ = { + isa = PBXGroup; + children = ( + B529DFAA271FB8B0000139B7 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B529DF9F271FB8AE000139B7 /* Notch Sim */ = { + isa = PBXNativeTarget; + buildConfigurationList = B529DFAF271FB8B0000139B7 /* Build configuration list for PBXNativeTarget "Notch Sim" */; + buildPhases = ( + B529DF9C271FB8AE000139B7 /* Sources */, + B529DF9D271FB8AE000139B7 /* Frameworks */, + B529DF9E271FB8AE000139B7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Notch Sim"; + productName = "Notch Sim"; + productReference = B529DFA0271FB8AE000139B7 /* Notch Sim.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B529DF98271FB8AE000139B7 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1300; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = "DONLY CHAN"; + TargetAttributes = { + B529DF9F271FB8AE000139B7 = { + CreatedOnToolsVersion = 13.0; + }; + }; + }; + buildConfigurationList = B529DF9B271FB8AE000139B7 /* Build configuration list for PBXProject "Notch Sim" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B529DF97271FB8AE000139B7; + productRefGroup = B529DFA1271FB8AE000139B7 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B529DF9F271FB8AE000139B7 /* Notch Sim */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B529DF9E271FB8AE000139B7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B529DFAB271FB8B0000139B7 /* Preview Assets.xcassets in Resources */, + B529DFA8271FB8B0000139B7 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B529DF9C271FB8AE000139B7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B529DFA6271FB8AE000139B7 /* ContentView.swift in Sources */, + B529DFA4271FB8AE000139B7 /* Notch_SimApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + B529DFAD271FB8B0000139B7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 11.3; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + B529DFAE271FB8B0000139B7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 11.3; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + B529DFB0271FB8B0000139B7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "Notch Sim/Notch_Sim.entitlements"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Notch Sim/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Notch-Sim-Info.plist"; + INFOPLIST_KEY_NSHumanReadableCopyright = "DONGLIN CHAN"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 11.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.propgm.Notch-Sim"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + B529DFB1271FB8B0000139B7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "Notch Sim/Notch_Sim.entitlements"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Notch Sim/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Notch-Sim-Info.plist"; + INFOPLIST_KEY_NSHumanReadableCopyright = "DONGLIN CHAN"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 11.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.propgm.Notch-Sim"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B529DF9B271FB8AE000139B7 /* Build configuration list for PBXProject "Notch Sim" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B529DFAD271FB8B0000139B7 /* Debug */, + B529DFAE271FB8B0000139B7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B529DFAF271FB8B0000139B7 /* Build configuration list for PBXNativeTarget "Notch Sim" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B529DFB0271FB8B0000139B7 /* Debug */, + B529DFB1271FB8B0000139B7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B529DF98271FB8AE000139B7 /* Project object */; +} diff --git a/Notch Sim.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Notch Sim.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Notch Sim.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Notch Sim.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Notch Sim.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Notch Sim.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Notch Sim.xcodeproj/project.xcworkspace/xcuserdata/a1990.xcuserdatad/UserInterfaceState.xcuserstate b/Notch Sim.xcodeproj/project.xcworkspace/xcuserdata/a1990.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..4deb796 Binary files /dev/null and b/Notch Sim.xcodeproj/project.xcworkspace/xcuserdata/a1990.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Notch Sim.xcodeproj/xcuserdata/a1990.xcuserdatad/xcschemes/xcschememanagement.plist b/Notch Sim.xcodeproj/xcuserdata/a1990.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..8f64920 --- /dev/null +++ b/Notch Sim.xcodeproj/xcuserdata/a1990.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Notch Sim.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/Notch Sim/Assets.xcassets/AccentColor.colorset/Contents.json b/Notch Sim/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Notch Sim/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Notch Sim/Assets.xcassets/AppIcon.appiconset/Contents.json b/Notch Sim/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..3f00db4 --- /dev/null +++ b/Notch Sim/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Notch Sim/Assets.xcassets/Contents.json b/Notch Sim/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Notch Sim/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Notch Sim/Assets.xcassets/Icon.imageset/Contents.json b/Notch Sim/Assets.xcassets/Icon.imageset/Contents.json new file mode 100644 index 0000000..1e1a6db --- /dev/null +++ b/Notch Sim/Assets.xcassets/Icon.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "repairing-service.png", + "idiom" : "mac" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" + } +} diff --git a/Notch Sim/Assets.xcassets/Icon.imageset/repairing-service.png b/Notch Sim/Assets.xcassets/Icon.imageset/repairing-service.png new file mode 100644 index 0000000..1c58286 Binary files /dev/null and b/Notch Sim/Assets.xcassets/Icon.imageset/repairing-service.png differ diff --git a/Notch Sim/Assets.xcassets/notch.imageset/Contents.json b/Notch Sim/Assets.xcassets/notch.imageset/Contents.json new file mode 100644 index 0000000..93b6809 --- /dev/null +++ b/Notch Sim/Assets.xcassets/notch.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "notch@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "notch@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "notch@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Notch Sim/Assets.xcassets/notch.imageset/notch@1x.png b/Notch Sim/Assets.xcassets/notch.imageset/notch@1x.png new file mode 100644 index 0000000..6e3f02a Binary files /dev/null and b/Notch Sim/Assets.xcassets/notch.imageset/notch@1x.png differ diff --git a/Notch Sim/Assets.xcassets/notch.imageset/notch@2x.png b/Notch Sim/Assets.xcassets/notch.imageset/notch@2x.png new file mode 100644 index 0000000..8678cbf Binary files /dev/null and b/Notch Sim/Assets.xcassets/notch.imageset/notch@2x.png differ diff --git a/Notch Sim/Assets.xcassets/notch.imageset/notch@3x.png b/Notch Sim/Assets.xcassets/notch.imageset/notch@3x.png new file mode 100644 index 0000000..89378af Binary files /dev/null and b/Notch Sim/Assets.xcassets/notch.imageset/notch@3x.png differ diff --git a/Notch Sim/Assets.xcassets/topleft.imageset/Contents.json b/Notch Sim/Assets.xcassets/topleft.imageset/Contents.json new file mode 100644 index 0000000..20a391f --- /dev/null +++ b/Notch Sim/Assets.xcassets/topleft.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "topleft@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "topleft@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "topleft@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Notch Sim/Assets.xcassets/topleft.imageset/topleft@1x.png b/Notch Sim/Assets.xcassets/topleft.imageset/topleft@1x.png new file mode 100644 index 0000000..55c360c Binary files /dev/null and b/Notch Sim/Assets.xcassets/topleft.imageset/topleft@1x.png differ diff --git a/Notch Sim/Assets.xcassets/topleft.imageset/topleft@2x.png b/Notch Sim/Assets.xcassets/topleft.imageset/topleft@2x.png new file mode 100644 index 0000000..810546d Binary files /dev/null and b/Notch Sim/Assets.xcassets/topleft.imageset/topleft@2x.png differ diff --git a/Notch Sim/Assets.xcassets/topleft.imageset/topleft@3x.png b/Notch Sim/Assets.xcassets/topleft.imageset/topleft@3x.png new file mode 100644 index 0000000..0904e0f Binary files /dev/null and b/Notch Sim/Assets.xcassets/topleft.imageset/topleft@3x.png differ diff --git a/Notch Sim/Assets.xcassets/topright.imageset/Contents.json b/Notch Sim/Assets.xcassets/topright.imageset/Contents.json new file mode 100644 index 0000000..db7618a --- /dev/null +++ b/Notch Sim/Assets.xcassets/topright.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "topright@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "topright@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "topright@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Notch Sim/Assets.xcassets/topright.imageset/topright@1x.png b/Notch Sim/Assets.xcassets/topright.imageset/topright@1x.png new file mode 100644 index 0000000..2aeea5b Binary files /dev/null and b/Notch Sim/Assets.xcassets/topright.imageset/topright@1x.png differ diff --git a/Notch Sim/Assets.xcassets/topright.imageset/topright@2x.png b/Notch Sim/Assets.xcassets/topright.imageset/topright@2x.png new file mode 100644 index 0000000..67c9003 Binary files /dev/null and b/Notch Sim/Assets.xcassets/topright.imageset/topright@2x.png differ diff --git a/Notch Sim/Assets.xcassets/topright.imageset/topright@3x.png b/Notch Sim/Assets.xcassets/topright.imageset/topright@3x.png new file mode 100644 index 0000000..a13729e Binary files /dev/null and b/Notch Sim/Assets.xcassets/topright.imageset/topright@3x.png differ diff --git a/Notch Sim/ContentView.swift b/Notch Sim/ContentView.swift new file mode 100644 index 0000000..5eebfb6 --- /dev/null +++ b/Notch Sim/ContentView.swift @@ -0,0 +1,32 @@ +// +// ContentView.swift +// Notch Sim +// +// Created by MBP_A1990 on 2021/10/20. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack(spacing: 0) { + HStack(alignment: .top) { + Image("topleft") + Spacer() + Image("notch") + Spacer() + Image("topright") + } + Spacer() + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + .background(Color.clear) + .edgesIgnoringSafeArea(.all) + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/Notch Sim/Notch_Sim.entitlements b/Notch Sim/Notch_Sim.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/Notch Sim/Notch_Sim.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/Notch Sim/Notch_SimApp.swift b/Notch Sim/Notch_SimApp.swift new file mode 100644 index 0000000..1f8f409 --- /dev/null +++ b/Notch Sim/Notch_SimApp.swift @@ -0,0 +1,106 @@ +// +// Notch_SimApp.swift +// Notch Sim +// +// Created by MBP_A1990 on 2021/10/20. +// + +import SwiftUI + +@main +struct Notch_SimApp: App { + @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate + + var body: some Scene { + WindowGroup { + EmptyView() + } + } +} + +class AppDelegate: NSObject, NSApplicationDelegate { + let screens = NSScreen.screens + var statusBarItem: NSStatusItem! + + var windows = [NSWindow]() + var windowControllers = [NSWindowController]() + + func applicationDidFinishLaunching(_ notification: Notification) { + let _ = NSApplication.shared.windows.map { + $0.close() + } + + setupWindow() + setupStatusBar() + + NotificationCenter.default.addObserver(self, selector: #selector(resetWindow), name: NSApplication.didChangeScreenParametersNotification, object: nil) + } + + func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } + + @objc func exitApp(_ sender: AnyObject?) { + NSApplication.shared.terminate(nil) + } + + private func setupWindow() { + if screens.count == 0 { + NSApplication.shared.terminate(self) + } + + let menubarHeight = NSApplication.shared.mainMenu!.menuBarHeight + + for i in 0.. + + + + LSUIElement + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee72f74 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Notch Simulator + +[![Platforms macOS](https://img.shields.io/badge/Platforms-macOS-purple.svg?style=flat)](http://www.apple.com/macos/) +[![License GPLv3](https://img.shields.io/badge/License-GPLv3-blue.svg?style=flat)](https://www.gnu.org/licenses/gpl-3.0.html) + +Pretend you have the latest MacBook Pro! + + +A SwiftUI version of https://github.com/megabitsenmzq/Notch-Simulator/. + +Thank you @megabitsenmzq