Skip to content

Commit

Permalink
Merge pull request #73 from rayhannabi/release/0.6.6.beta.1
Browse files Browse the repository at this point in the history
Release/0.6.6.beta.1
  • Loading branch information
rayhannabi committed Sep 27, 2019
2 parents f9a32f5 + c5b59ab commit 254fe00
Show file tree
Hide file tree
Showing 17 changed files with 188 additions and 74 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ An easy-to-use alert framework for iOS written purely in Swift. With native look

## Features

* iOS 13 compatible, supports Dark Mode.
* Title
* Description message
* Banner image below the description message
Expand All @@ -23,8 +24,8 @@ An easy-to-use alert framework for iOS written purely in Swift. With native look
## Requirements

* iOS 9.0+
* Xcode 10+
* Swift 5
* Xcode 11.0+
* Swift 5.0
* Objective-C 2.0 (ARC required)

## Installation
Expand Down
2 changes: 1 addition & 1 deletion RNAlertController.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Pod::Spec.new do |spec|

spec.name = "RNAlertController"
spec.version = "0.6.5"
spec.version = "0.6.6.beta.1"
spec.summary = "Custom Alert Framework for iOS"

spec.description = <<-DESC
Expand Down
53 changes: 52 additions & 1 deletion RNAlertController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
E8ECFAE422772EFC00D4BA3F /* AlertButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8ECFADC22772EFB00D4BA3F /* AlertButton.swift */; };
E8ECFAE622772EFC00D4BA3F /* AlertButtonStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8ECFADE22772EFB00D4BA3F /* AlertButtonStackView.swift */; };
E8ECFAE722772EFC00D4BA3F /* RNAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8ECFADF22772EFB00D4BA3F /* RNAlertController.swift */; };
E8F6B2E9233E32E0006A03F4 /* UIView+Appearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8F6B2E8233E32E0006A03F4 /* UIView+Appearance.swift */; };
E8FEEE242310409200A155E2 /* AlertActionButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8FEEE232310409200A155E2 /* AlertActionButton.swift */; };
E8FEEE2623104A9F00A155E2 /* UIColor+Extra.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8FEEE2523104A9F00A155E2 /* UIColor+Extra.swift */; };
E8FF167F2282B48C00CC8807 /* RNAlertController+API.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8FF167E2282B48C00CC8807 /* RNAlertController+API.swift */; };
Expand Down Expand Up @@ -104,6 +105,7 @@
E8ECFADC22772EFB00D4BA3F /* AlertButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertButton.swift; sourceTree = "<group>"; };
E8ECFADE22772EFB00D4BA3F /* AlertButtonStackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertButtonStackView.swift; sourceTree = "<group>"; };
E8ECFADF22772EFB00D4BA3F /* RNAlertController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RNAlertController.swift; sourceTree = "<group>"; };
E8F6B2E8233E32E0006A03F4 /* UIView+Appearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Appearance.swift"; sourceTree = "<group>"; };
E8FEEE232310409200A155E2 /* AlertActionButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertActionButton.swift; sourceTree = "<group>"; };
E8FEEE2523104A9F00A155E2 /* UIColor+Extra.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extra.swift"; sourceTree = "<group>"; };
E8FF167E2282B48C00CC8807 /* RNAlertController+API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RNAlertController+API.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -142,6 +144,7 @@
E8ECFAD922772EFB00D4BA3F /* UIButton+Action.swift */,
E8FEEE2523104A9F00A155E2 /* UIColor+Extra.swift */,
E8ECFADA22772EFB00D4BA3F /* UIFont+Extra.swift */,
E8F6B2E8233E32E0006A03F4 /* UIView+Appearance.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -295,6 +298,7 @@
E8508697231E647600F0D6B3 /* Frameworks */,
E8508698231E647600F0D6B3 /* Resources */,
E85086C4231E656C00F0D6B3 /* Embed Frameworks */,
E8F6B2EB233E4C8F006A03F4 /* ShellScript */,
);
buildRules = (
);
Expand All @@ -314,6 +318,7 @@
E8ECFAC722772ED000D4BA3F /* Sources */,
E8ECFAC822772ED000D4BA3F /* Frameworks */,
E8ECFAC922772ED000D4BA3F /* Resources */,
E8F6B2EA233E4C77006A03F4 /* ShellScript */,
);
buildRules = (
);
Expand All @@ -331,7 +336,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1030;
LastUpgradeCheck = 1030;
LastUpgradeCheck = 1100;
ORGANIZATIONNAME = "Rayhan Nabi";
TargetAttributes = {
E8508674231E5F2100F0D6B3 = {
Expand Down Expand Up @@ -395,6 +400,43 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
E8F6B2EA233E4C77006A03F4 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "buildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"${INFOPLIST_FILE}\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"${INFOPLIST_FILE}\"\n";
};
E8F6B2EB233E4C8F006A03F4 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "buildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"${INFOPLIST_FILE}\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"${INFOPLIST_FILE}\"\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
E8508671231E5F2100F0D6B3 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -433,6 +475,7 @@
E8CE528F227B07D200466CAF /* AlertImageView.swift in Sources */,
E8FEEE242310409200A155E2 /* AlertActionButton.swift in Sources */,
E8CE5291227B092400466CAF /* AlertStackView.swift in Sources */,
E8F6B2E9233E32E0006A03F4 /* UIView+Appearance.swift in Sources */,
E8ECFAE322772EFC00D4BA3F /* AlertLabel.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -532,6 +575,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.6.6;
PRODUCT_BUNDLE_IDENTIFIER = com.rayhan.ios.RNAlertControllerExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -552,6 +596,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.6.6;
PRODUCT_BUNDLE_IDENTIFIER = com.rayhan.ios.RNAlertControllerExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -563,6 +608,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand Down Expand Up @@ -627,6 +673,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand Down Expand Up @@ -688,6 +735,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1001;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = PCH85ZHVFN;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -701,6 +749,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.6.6;
PRODUCT_BUNDLE_IDENTIFIER = com.rayhan.ios.RNAlertController;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -718,6 +767,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1001;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = PCH85ZHVFN;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -731,6 +781,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.6.6;
PRODUCT_BUNDLE_IDENTIFIER = com.rayhan.ios.RNAlertController;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1030"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8ECFACA22772ED000D4BA3F"
BuildableName = "RNAlertController.framework"
BlueprintName = "RNAlertController"
ReferencedContainer = "container:RNAlertController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8ECFACA22772ED000D4BA3F"
BuildableName = "RNAlertController.framework"
BlueprintName = "RNAlertController"
ReferencedContainer = "container:RNAlertController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:RNAlertController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1030"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8508699231E647600F0D6B3"
BuildableName = "RNAlertControllerExample.app"
BlueprintName = "RNAlertControllerExample"
ReferencedContainer = "container:RNAlertController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8508699231E647600F0D6B3"
BuildableName = "RNAlertControllerExample.app"
BlueprintName = "RNAlertControllerExample"
ReferencedContainer = "container:RNAlertController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -71,8 +69,6 @@
ReferencedContainer = "container:RNAlertController.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1030"
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -23,8 +23,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -36,8 +34,6 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
2 changes: 1 addition & 1 deletion RNAlertControllerExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.6.5</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>675</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="8td-1C-4Kl">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="8td-1C-4Kl">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down
12 changes: 10 additions & 2 deletions Source/Extensions/UIColor+Extra.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ extension UIColor {
return UIColor(red: 255/255, green: 59/255, blue: 48/255, alpha: 1.0)
}

static var defaultBackground: UIColor {
static var defaultLightBackground: UIColor {
return UIColor(white: 1, alpha: 0.75)
}

static var highlightedBackground: UIColor {
static var defaultDarkBackground: UIColor {
return UIColor(white: 0, alpha: 0.40)
}

static var highlightedLightBackground: UIColor {
return UIColor(white: 1, alpha: 0.35)
}

static var highlightedDarkBackground: UIColor {
return UIColor(white: 0, alpha: 0.0)
}

}
2 changes: 1 addition & 1 deletion Source/Extensions/UIFont+Extra.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import UIKit
extension UIFont {

class var alertTitleFont: UIFont {
return self.systemFont(ofSize: 18, weight: .semibold)
return self.systemFont(ofSize: 18, weight: .bold)
}

class var alertMessageFont: UIFont {
Expand Down
21 changes: 21 additions & 0 deletions Source/Extensions/UIView+Appearance.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// UIView+Appearance.swift
// RNAlertController
//
// Created by Rayhan Nabi on 9/27/19.
// Copyright © 2019 Rayhan Nabi. All rights reserved.
//

import Foundation

extension UIView {

var isDarkInterfaceStyle: Bool {
if #available(iOS 12.0, *) {
return traitCollection.userInterfaceStyle == .dark
} else {
return false
}
}

}
Loading

0 comments on commit 254fe00

Please sign in to comment.