Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0ab8f5f396 | |||
| 8fd82dcdc6 | |||
| d691134fea | |||
| 2fce7c8818 | |||
| 195e99c68d | |||
| 029ba7943c | |||
| 9c1d49b094 | |||
| 477c95fb94 | |||
| 4e12eb580f | |||
| e7d66aefe3 |
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0830"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5E2FFB5218367C01003333F8"
|
||||
BuildableName = "CWNotificationDemo.app"
|
||||
BlueprintName = "CWNotificationDemo"
|
||||
ReferencedContainer = "container:CWNotificationDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5E2FFB6D18367C01003333F8"
|
||||
BuildableName = "CWNotificationDemoTests.xctest"
|
||||
BlueprintName = "CWNotificationDemoTests"
|
||||
ReferencedContainer = "container:CWNotificationDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5E2FFB5218367C01003333F8"
|
||||
BuildableName = "CWNotificationDemo.app"
|
||||
BlueprintName = "CWNotificationDemo"
|
||||
ReferencedContainer = "container:CWNotificationDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5E2FFB5218367C01003333F8"
|
||||
BuildableName = "CWNotificationDemo.app"
|
||||
BlueprintName = "CWNotificationDemo"
|
||||
ReferencedContainer = "container:CWNotificationDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "5E2FFB5218367C01003333F8"
|
||||
BuildableName = "CWNotificationDemo.app"
|
||||
BlueprintName = "CWNotificationDemo"
|
||||
ReferencedContainer = "container:CWNotificationDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "CWStatusBarNotification"
|
||||
s.version = "2.3.3"
|
||||
s.version = "2.3.5"
|
||||
s.summary = "A library that creates status bar notifications."
|
||||
s.description = "CWStatusBarNotification is a library allows you to present a beautiful text-based notification in the status bar."
|
||||
s.homepage = "https://github.com/cezarywojcik/CWStatusBarNotification"
|
||||
|
||||
@@ -0,0 +1,311 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
73F0115B1F31AF2900EDC602 /* CWStatusBarNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 73F011591F31AF2900EDC602 /* CWStatusBarNotification.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
73F0115C1F31AF2900EDC602 /* CWStatusBarNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 73F0115A1F31AF2900EDC602 /* CWStatusBarNotification.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
73F0114C1F31AE9F00EDC602 /* CWStatusBarNotification.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CWStatusBarNotification.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
73F011571F31AF1B00EDC602 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
73F011591F31AF2900EDC602 /* CWStatusBarNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CWStatusBarNotification.h; path = CWStatusBarNotification/CWStatusBarNotification.h; sourceTree = "<group>"; };
|
||||
73F0115A1F31AF2900EDC602 /* CWStatusBarNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CWStatusBarNotification.m; path = CWStatusBarNotification/CWStatusBarNotification.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
73F011481F31AE9F00EDC602 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
73F011421F31AE9F00EDC602 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
73F011591F31AF2900EDC602 /* CWStatusBarNotification.h */,
|
||||
73F0115A1F31AF2900EDC602 /* CWStatusBarNotification.m */,
|
||||
73F011571F31AF1B00EDC602 /* Info.plist */,
|
||||
73F0114D1F31AE9F00EDC602 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
73F0114D1F31AE9F00EDC602 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
73F0114C1F31AE9F00EDC602 /* CWStatusBarNotification.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
73F011491F31AE9F00EDC602 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
73F0115B1F31AF2900EDC602 /* CWStatusBarNotification.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
73F0114B1F31AE9F00EDC602 /* CWStatusBarNotification */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 73F011541F31AE9F00EDC602 /* Build configuration list for PBXNativeTarget "CWStatusBarNotification" */;
|
||||
buildPhases = (
|
||||
73F011471F31AE9F00EDC602 /* Sources */,
|
||||
73F011481F31AE9F00EDC602 /* Frameworks */,
|
||||
73F011491F31AE9F00EDC602 /* Headers */,
|
||||
73F0114A1F31AE9F00EDC602 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = CWStatusBarNotification;
|
||||
productName = CWStatusBarNotification;
|
||||
productReference = 73F0114C1F31AE9F00EDC602 /* CWStatusBarNotification.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
73F011431F31AE9F00EDC602 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0900;
|
||||
ORGANIZATIONNAME = cezarywojcik;
|
||||
TargetAttributes = {
|
||||
73F0114B1F31AE9F00EDC602 = {
|
||||
CreatedOnToolsVersion = 8.3.3;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 73F011461F31AE9F00EDC602 /* Build configuration list for PBXProject "CWStatusBarNotification" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 73F011421F31AE9F00EDC602;
|
||||
productRefGroup = 73F0114D1F31AE9F00EDC602 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
73F0114B1F31AE9F00EDC602 /* CWStatusBarNotification */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
73F0114A1F31AE9F00EDC602 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
73F011471F31AE9F00EDC602 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
73F0115C1F31AF2900EDC602 /* CWStatusBarNotification.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
73F011521F31AE9F00EDC602 /* 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++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
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;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
73F011531F31AE9F00EDC602 /* 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++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = 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_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
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;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
73F011551F31AE9F00EDC602 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.cezarywojcik.CWStatusBarNotification;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
73F011561F31AE9F00EDC602 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.cezarywojcik.CWStatusBarNotification;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
73F011461F31AE9F00EDC602 /* Build configuration list for PBXProject "CWStatusBarNotification" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
73F011521F31AE9F00EDC602 /* Debug */,
|
||||
73F011531F31AE9F00EDC602 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
73F011541F31AE9F00EDC602 /* Build configuration list for PBXNativeTarget "CWStatusBarNotification" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
73F011551F31AE9F00EDC602 /* Debug */,
|
||||
73F011561F31AE9F00EDC602 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 73F011431F31AE9F00EDC602 /* Project object */;
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "73F0114B1F31AE9F00EDC602"
|
||||
BuildableName = "CWStatusBarNotification.framework"
|
||||
BlueprintName = "CWStatusBarNotification"
|
||||
ReferencedContainer = "container:CWStatusBarNotification.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "73F0114B1F31AE9F00EDC602"
|
||||
BuildableName = "CWStatusBarNotification.framework"
|
||||
BlueprintName = "CWStatusBarNotification"
|
||||
ReferencedContainer = "container:CWStatusBarNotification.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "73F0114B1F31AE9F00EDC602"
|
||||
BuildableName = "CWStatusBarNotification.framework"
|
||||
BlueprintName = "CWStatusBarNotification"
|
||||
ReferencedContainer = "container:CWStatusBarNotification.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,4 +1,3 @@
|
||||
//
|
||||
// CWStatusBarNotification
|
||||
// CWNotificationDemo
|
||||
//
|
||||
@@ -6,6 +5,8 @@
|
||||
// Copyright (c) 2015 Cezary Wojcik. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/**
|
||||
* @brief A simple completion used for handling tapping the notification.
|
||||
*/
|
||||
@@ -14,10 +15,13 @@ typedef void(^CWCompletionBlock)(void);
|
||||
# pragma mark - ScrollLabel
|
||||
|
||||
/**
|
||||
* A subclass of @c UILabel that scrolls the text if it is too long for the
|
||||
* A subclass of @c UILabel that scrolls the text if it is too long for the
|
||||
* label.
|
||||
*/
|
||||
@interface ScrollLabel : UILabel
|
||||
|
||||
@property (assign, nonatomic) UIEdgeInsets edgeInsets;
|
||||
|
||||
/**
|
||||
* Used to find the amount of time that the label will spend scrolling.
|
||||
* @return The amount of time that will be spent scrolling.
|
||||
@@ -28,7 +32,7 @@ typedef void(^CWCompletionBlock)(void);
|
||||
# pragma mark - CWWindowContainer
|
||||
|
||||
/**
|
||||
* A subclass of @c UIWindow that overrides the @c hitTest method in order to
|
||||
* A subclass of @c UIWindow that overrides the @c hitTest method in order to
|
||||
* allow tap events to pass through the window.
|
||||
*/
|
||||
@interface CWWindowContainer : UIWindow
|
||||
@@ -47,7 +51,7 @@ typedef void(^CWCompletionBlock)(void);
|
||||
@property (nonatomic) UIStatusBarStyle preferredStatusBarStyle;
|
||||
/// Indicats the supported interface orientations.
|
||||
@property (nonatomic, setter=setSupportedInterfaceOrientations:)
|
||||
UIInterfaceOrientationMask supportedInterfaceOrientations;
|
||||
UIInterfaceOrientationMask supportedInterfaceOrientations;
|
||||
@end
|
||||
|
||||
# pragma mark - CWStatusBarNotification
|
||||
@@ -68,7 +72,9 @@ typedef NS_ENUM(NSInteger, CWNotificationStyle) {
|
||||
/// Covers the status bar portion of the screen.
|
||||
CWNotificationStyleStatusBarNotification,
|
||||
/// Covers the status bar and navigation bar portions of the screen.
|
||||
CWNotificationStyleNavigationBarNotification
|
||||
CWNotificationStyleNavigationBarNotification,
|
||||
/// For iPhone X Model
|
||||
CWNotificationStyleHomeIndicatorNotification
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -155,7 +161,7 @@ typedef NS_ENUM(NSInteger, CWNotificationAnimationType) {
|
||||
@property (nonatomic) NSTimeInterval notificationAnimationDuration;
|
||||
/**
|
||||
* Determines whether the notification covers the status bar or both the status
|
||||
* bar and the navigation bar. Default value is
|
||||
* bar and the navigation bar. Default value is
|
||||
* @c CWNotificationStyleStatusBarNotification.
|
||||
*/
|
||||
@property (nonatomic) CWNotificationStyle notificationStyle;
|
||||
@@ -169,10 +175,10 @@ typedef NS_ENUM(NSInteger, CWNotificationAnimationType) {
|
||||
* value is @c CWNotificationAnimationStyleBottom.
|
||||
*/
|
||||
@property (nonatomic) CWNotificationAnimationStyle
|
||||
notificationAnimationOutStyle;
|
||||
notificationAnimationOutStyle;
|
||||
/**
|
||||
* Determines whether the the notification's animation replaces the existing
|
||||
* content or overlays it. Default value is
|
||||
* Determines whether the the notification's animation replaces the existing
|
||||
* content or overlays it. Default value is
|
||||
* @c CWNotificationAnimationTypeReplace.
|
||||
*/
|
||||
@property (nonatomic) CWNotificationAnimationType notificationAnimationType;
|
||||
@@ -207,7 +213,7 @@ typedef NS_ENUM(NSInteger, CWNotificationAnimationType) {
|
||||
forDuration:(NSTimeInterval)duration;
|
||||
|
||||
/**
|
||||
* Displays a notification with the indicated attributed string and then
|
||||
* Displays a notification with the indicated attributed string and then
|
||||
* performs the completion block once the notification animates in.
|
||||
* @param attributedString
|
||||
* The content of the message to be displayed.
|
||||
@@ -215,7 +221,7 @@ typedef NS_ENUM(NSInteger, CWNotificationAnimationType) {
|
||||
* The block to be invoked once the notification is displayed.
|
||||
*/
|
||||
- (void)displayNotificationWithAttributedString:(NSAttributedString *)
|
||||
attributedString
|
||||
attributedString
|
||||
completion:(void (^)(void))completion;
|
||||
|
||||
/**
|
||||
@@ -228,7 +234,7 @@ typedef NS_ENUM(NSInteger, CWNotificationAnimationType) {
|
||||
* not including the animate in and out times.
|
||||
*/
|
||||
- (void)displayNotificationWithAttributedString:(NSAttributedString *)
|
||||
attributedString
|
||||
attributedString
|
||||
forDuration:(NSTimeInterval)duration;
|
||||
|
||||
/**
|
||||
@@ -270,3 +276,4 @@ typedef NS_ENUM(NSInteger, CWNotificationAnimationType) {
|
||||
- (void)dismissNotification;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
#define SCROLL_SPEED 40.0f
|
||||
#define SCROLL_DELAY 1.0f
|
||||
|
||||
#define HOMEINDICATOR_OFFSET 11.0f
|
||||
#define HOMEINDICATOR_TEXT_INSET_BOTTOM 14.0f
|
||||
|
||||
# pragma mark - ScrollLabel
|
||||
|
||||
@implementation ScrollLabel
|
||||
@@ -56,7 +59,7 @@
|
||||
if ([self scrollOffset] > 0) {
|
||||
rect.size.width = [self fullWidth] + PADDING * 2;
|
||||
UIGraphicsBeginImageContextWithOptions(rect.size, NO, [UIScreen mainScreen].scale);
|
||||
[super drawTextInRect:rect];
|
||||
[super drawTextInRect:UIEdgeInsetsInsetRect(rect, self.edgeInsets)];
|
||||
textImage.image = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
[textImage sizeToFit];
|
||||
@@ -69,7 +72,7 @@
|
||||
}];
|
||||
} else {
|
||||
textImage.image = nil;
|
||||
[super drawTextInRect:CGRectInset(rect, PADDING, 0)];
|
||||
[super drawTextInRect:UIEdgeInsetsInsetRect(CGRectInset(rect, PADDING, 0), self.edgeInsets)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +93,7 @@
|
||||
if (point.y > 0 && point.y < (self.notificationHeight != 0.0 ? self.notificationHeight : height)) {
|
||||
return [super hitTest:point withEvent:event];
|
||||
}
|
||||
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -106,6 +109,8 @@
|
||||
|
||||
@implementation CWViewController
|
||||
|
||||
@synthesize preferredStatusBarStyle = _preferredStatusBarStyle;
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle
|
||||
{
|
||||
return _preferredStatusBarStyle;
|
||||
@@ -136,40 +141,40 @@ typedef void(^CWDelayedBlockHandle)(BOOL cancel);
|
||||
|
||||
static CWDelayedBlockHandle perform_block_after_delay(CGFloat seconds, dispatch_block_t block)
|
||||
{
|
||||
if (block == nil) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
__block dispatch_block_t blockToExecute = [block copy];
|
||||
__block CWDelayedBlockHandle delayHandleCopy = nil;
|
||||
|
||||
CWDelayedBlockHandle delayHandle = ^(BOOL cancel){
|
||||
if (NO == cancel && nil != blockToExecute) {
|
||||
dispatch_async(dispatch_get_main_queue(), blockToExecute);
|
||||
}
|
||||
|
||||
blockToExecute = nil;
|
||||
delayHandleCopy = nil;
|
||||
};
|
||||
|
||||
delayHandleCopy = [delayHandle copy];
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, seconds * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
||||
if (nil != delayHandleCopy) {
|
||||
delayHandleCopy(NO);
|
||||
}
|
||||
});
|
||||
|
||||
return delayHandleCopy;
|
||||
if (block == nil) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
__block dispatch_block_t blockToExecute = [block copy];
|
||||
__block CWDelayedBlockHandle delayHandleCopy = nil;
|
||||
|
||||
CWDelayedBlockHandle delayHandle = ^(BOOL cancel){
|
||||
if (NO == cancel && nil != blockToExecute) {
|
||||
dispatch_async(dispatch_get_main_queue(), blockToExecute);
|
||||
}
|
||||
|
||||
blockToExecute = nil;
|
||||
delayHandleCopy = nil;
|
||||
};
|
||||
|
||||
delayHandleCopy = [delayHandle copy];
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, seconds * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
||||
if (nil != delayHandleCopy) {
|
||||
delayHandleCopy(NO);
|
||||
}
|
||||
});
|
||||
|
||||
return delayHandleCopy;
|
||||
};
|
||||
|
||||
static void cancel_delayed_block(CWDelayedBlockHandle delayedHandle)
|
||||
{
|
||||
if (delayedHandle == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
delayedHandle(YES);
|
||||
if (delayedHandle == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
delayedHandle(YES);
|
||||
}
|
||||
# pragma mark - CWStatusBarNotification
|
||||
|
||||
@@ -213,11 +218,11 @@ static void cancel_delayed_block(CWDelayedBlockHandle delayedHandle)
|
||||
self.notificationIsDismissing = NO;
|
||||
self.isCustomView = NO;
|
||||
self.preferredStatusBarStyle = UIStatusBarStyleDefault;
|
||||
|
||||
|
||||
// create tap recognizer
|
||||
self.tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(notificationTapped:)];
|
||||
self.tapGestureRecognizer.numberOfTapsRequired = 1;
|
||||
|
||||
|
||||
// create default tap block
|
||||
__weak typeof(self) weakSelf = self;
|
||||
self.notificationTappedBlock = ^(void) {
|
||||
@@ -236,6 +241,16 @@ static void cancel_delayed_block(CWDelayedBlockHandle delayedHandle)
|
||||
if (self.notificationLabelHeight > 0) {
|
||||
return self.notificationLabelHeight;
|
||||
}
|
||||
////
|
||||
|
||||
if (@available(iOS 11.0, *)) {
|
||||
if ([self notificationStyle]==CWNotificationStyleHomeIndicatorNotification) {
|
||||
return [[[UIApplication sharedApplication] keyWindow] safeAreaInsets].bottom;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CGFloat statusBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.height;
|
||||
if (SYSTEM_VERSION_LESS_THAN(@"8.0") && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
|
||||
statusBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.width;
|
||||
@@ -248,15 +263,28 @@ static void cancel_delayed_block(CWDelayedBlockHandle delayedHandle)
|
||||
if (SYSTEM_VERSION_LESS_THAN(@"8.0") && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
|
||||
return [UIScreen mainScreen].bounds.size.height;
|
||||
}
|
||||
return [UIScreen mainScreen].bounds.size.width;
|
||||
return [[UIApplication sharedApplication] keyWindow].bounds.size.width;
|
||||
}
|
||||
|
||||
- (CGFloat)getStatusBarOffset
|
||||
{
|
||||
CGFloat offset=0.0f;
|
||||
|
||||
if ([self getStatusBarHeight] == 40.0f) {
|
||||
return -20.0f;
|
||||
offset = -20.0f;
|
||||
}
|
||||
return 0.0f;
|
||||
////
|
||||
|
||||
if (@available(iOS 11.0, *)) {
|
||||
if ([self notificationStyle]==CWNotificationStyleHomeIndicatorNotification) {
|
||||
UIWindow *keyWindow=[[UIApplication sharedApplication] keyWindow];
|
||||
offset=keyWindow.frame.size.height-[keyWindow safeAreaInsets].bottom-HOMEINDICATOR_OFFSET;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
- (CGFloat)getNavigationBarHeight
|
||||
@@ -271,6 +299,8 @@ static void cancel_delayed_block(CWDelayedBlockHandle delayedHandle)
|
||||
- (CGFloat)getNotificationLabelHeight
|
||||
{
|
||||
switch (self.notificationStyle) {
|
||||
case CWNotificationStyleHomeIndicatorNotification:
|
||||
return [self getStatusBarHeight]+HOMEINDICATOR_OFFSET;
|
||||
case CWNotificationStyleStatusBarNotification:
|
||||
return [self getStatusBarHeight];
|
||||
case CWNotificationStyleNavigationBarNotification:
|
||||
@@ -347,6 +377,12 @@ static void cancel_delayed_block(CWDelayedBlockHandle delayedHandle)
|
||||
- (void)createNotificationLabelWithMessage:(NSString *)message
|
||||
{
|
||||
self.notificationLabel = [ScrollLabel new];
|
||||
|
||||
if ([self notificationStyle]==CWNotificationStyleHomeIndicatorNotification) {
|
||||
self.notificationLabel.edgeInsets=UIEdgeInsetsMake(0, 0, HOMEINDICATOR_TEXT_INSET_BOTTOM, 0);
|
||||
|
||||
}
|
||||
|
||||
self.notificationLabel.numberOfLines = self.multiline ? 0 : 1;
|
||||
self.notificationLabel.text = message;
|
||||
self.notificationLabel.textAlignment = NSTextAlignmentCenter;
|
||||
@@ -363,20 +399,20 @@ static void cancel_delayed_block(CWDelayedBlockHandle delayedHandle)
|
||||
// Doesn't use autoresizing masks so that we can create constraints below manually
|
||||
[view setTranslatesAutoresizingMaskIntoConstraints:NO];
|
||||
[self.customView addSubview:view];
|
||||
|
||||
|
||||
// Setup Auto Layout constaints so that the custom view that is added is consrtained to be the same
|
||||
// size as its superview, whose frame will be altered
|
||||
[self.customView addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:self.customView attribute:NSLayoutAttributeTrailing multiplier:1.0 constant:0.0]];
|
||||
[self.customView addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.customView attribute:NSLayoutAttributeLeading multiplier:1.0 constant:0.0]];
|
||||
[self.customView addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.customView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0.0]];
|
||||
[self.customView addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.customView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0.0]];
|
||||
|
||||
|
||||
[self setupNotificationView:self.customView];
|
||||
}
|
||||
|
||||
- (void)createNotificationWindow
|
||||
{
|
||||
self.notificationWindow = [[CWWindowContainer alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
self.notificationWindow = [[CWWindowContainer alloc] initWithFrame:[[[UIApplication sharedApplication] keyWindow] bounds]];
|
||||
self.notificationWindow.backgroundColor = [UIColor clearColor];
|
||||
self.notificationWindow.userInteractionEnabled = YES;
|
||||
self.notificationWindow.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
@@ -470,27 +506,34 @@ static void cancel_delayed_block(CWDelayedBlockHandle delayedHandle)
|
||||
if (!self.notificationIsShowing) {
|
||||
self.isCustomView = NO;
|
||||
self.notificationIsShowing = YES;
|
||||
|
||||
|
||||
// create UIWindow
|
||||
[self createNotificationWindow];
|
||||
|
||||
|
||||
// create ScrollLabel
|
||||
[self createNotificationLabelWithMessage:message];
|
||||
|
||||
|
||||
// create status bar view
|
||||
[self createStatusBarView];
|
||||
|
||||
if ([self notificationStyle]==CWNotificationStyleHomeIndicatorNotification) {
|
||||
[self.statusBarView removeFromSuperview];
|
||||
self.statusBarView=nil;
|
||||
|
||||
} else {
|
||||
[self createStatusBarView];
|
||||
|
||||
}
|
||||
|
||||
// add label to window
|
||||
[self.notificationWindow.rootViewController.view addSubview:self.notificationLabel];
|
||||
[self.notificationWindow.rootViewController.view bringSubviewToFront:self.notificationLabel];
|
||||
[self.notificationWindow setHidden:NO];
|
||||
|
||||
|
||||
// checking for screen orientation change
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateStatusBarFrame) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
|
||||
|
||||
|
||||
// checking for status bar change
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateStatusBarFrame) name:UIApplicationWillChangeStatusBarFrameNotification object:nil];
|
||||
|
||||
|
||||
// animate
|
||||
[UIView animateWithDuration:self.notificationAnimationDuration animations:^{
|
||||
[self firstFrameChange];
|
||||
@@ -529,28 +572,35 @@ static void cancel_delayed_block(CWDelayedBlockHandle delayedHandle)
|
||||
if (!self.notificationIsShowing) {
|
||||
self.isCustomView = YES;
|
||||
self.notificationIsShowing = YES;
|
||||
|
||||
|
||||
// create window
|
||||
[self createNotificationWindow];
|
||||
|
||||
|
||||
// setup view
|
||||
[self createNotificationCustomView:view];
|
||||
|
||||
|
||||
// create status bar view
|
||||
[self createStatusBarView];
|
||||
|
||||
if ([self notificationStyle]==CWNotificationStyleHomeIndicatorNotification) {
|
||||
[self.statusBarView removeFromSuperview];
|
||||
self.statusBarView=nil;
|
||||
|
||||
} else {
|
||||
[self createStatusBarView];
|
||||
|
||||
}
|
||||
|
||||
// add view to window
|
||||
UIView *rootView = self.notificationWindow.rootViewController.view;
|
||||
[rootView addSubview:self.customView];
|
||||
[rootView bringSubviewToFront:self.customView];
|
||||
[self.notificationWindow setHidden:NO];
|
||||
|
||||
|
||||
// checking for screen orientation change
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateStatusBarFrame) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
|
||||
|
||||
|
||||
// checking for status bar change
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateStatusBarFrame) name:UIApplicationWillChangeStatusBarFrameNotification object:nil];
|
||||
|
||||
|
||||
// animate
|
||||
[UIView animateWithDuration:self.notificationAnimationDuration animations:^{
|
||||
[self firstFrameChange];
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user