Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
V 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Benny Lach committed Feb 25, 2017
1 parent ae7002d commit e994081
Show file tree
Hide file tree
Showing 38 changed files with 1,980 additions and 22 deletions.
16 changes: 7 additions & 9 deletions BLAlert.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,25 @@

Pod::Spec.new do |s|
s.name = 'BLAlert'
s.version = '0.1.0'
s.summary = 'A short description of BLAlert.'
s.version = '1.0'
s.summary = 'Show custom alerts with a neat animation as found in Tweetbot 4.'

# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!

s.description = <<-DESC
TODO: Add long description of the pod here.
DESC
s.description = 'Beautiful animated alerts inspired by Tweetbot 4'

s.homepage = 'https://github.com/B-Lach/BLAlert'
s.homepage = 'https://github.com/B-Lach/Alert'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'B-Lach' => 'benny@discollect.me' }
s.source = { :git => 'https://github.com/B-Lach/BLAlert.git', :tag => s.version.to_s }
s.author = { 'Benny Lsch' => 'benny@discollect.me' }
s.source = { :git => 'https://github.com/B-Lach/Alert.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'

s.source_files = 'BLAlert/Classes/**/*'

Expand Down
369 changes: 369 additions & 0 deletions BLAlert/Classes/Alert.swift

Large diffs are not rendered by default.

Empty file removed BLAlert/Classes/ReplaceMe.swift
Empty file.
8 changes: 5 additions & 3 deletions Example/BLAlert.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
11EDB4FAB4AB096CBECE36ED /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
12F8621310DC3061E1A1471B /* BLAlert.podspec */ = {isa = PBXFileReference; includeInIndex = 1; name = BLAlert.podspec; path = ../BLAlert.podspec; sourceTree = "<group>"; };
11EDB4FAB4AB096CBECE36ED /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
12F8621310DC3061E1A1471B /* BLAlert.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = BLAlert.podspec; path = ../BLAlert.podspec; sourceTree = "<group>"; };
28420DFDC4CB00853FE33FE4 /* Pods_BLAlert_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BLAlert_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2F0484544073F25624DB4DE9 /* Pods-BLAlert_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BLAlert_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-BLAlert_Example/Pods-BLAlert_Example.release.xcconfig"; sourceTree = "<group>"; };
5BA428605D6686C20F0C2F87 /* Pods-BLAlert_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BLAlert_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BLAlert_Example/Pods-BLAlert_Example.debug.xcconfig"; sourceTree = "<group>"; };
Expand All @@ -45,7 +45,7 @@
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
685A4EDA783DA472C8EA9D3A /* Pods-BLAlert_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BLAlert_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-BLAlert_Tests/Pods-BLAlert_Tests.release.xcconfig"; sourceTree = "<group>"; };
9E25AD5523DF2B19C93BC685 /* Pods-BLAlert_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BLAlert_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BLAlert_Tests/Pods-BLAlert_Tests.debug.xcconfig"; sourceTree = "<group>"; };
FA7F5322B0300C1D1B8E5B3A /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; name = README.md; path = ../README.md; sourceTree = "<group>"; };
FA7F5322B0300C1D1B8E5B3A /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
FD5EFD277D4C816FD780244C /* Pods_BLAlert_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BLAlert_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -497,6 +497,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = BLAlert/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
Expand All @@ -511,6 +512,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = BLAlert/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
Expand Down
10 changes: 10 additions & 0 deletions Example/BLAlert.xcworkspace/contents.xcworkspacedata

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

72 changes: 65 additions & 7 deletions Example/BLAlert/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,25 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="ybR-5s-gv3">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<!--Example-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="BLAlert_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q5Y-04-bp0">
<rect key="frame" x="159" y="222" width="57" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Warning"/>
<connections>
<action selector="warning:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="JCU-Fb-pEl"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x77-wV-1QL">
<rect key="frame" x="158" y="289" width="58" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Success"/>
<connections>
<action selector="success:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="ATC-9N-3An"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xzf-Rh-Lhs">
<rect key="frame" x="160" y="351" width="54" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Custom"/>
<connections>
<action selector="custom:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="lpR-qa-3tw"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZbU-9m-0k4">
<rect key="frame" x="170" y="165" width="34" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Error"/>
<connections>
<action selector="error:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="GZM-m0-aC2"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<navigationItem key="navigationItem" title="Example" id="fOg-oE-b45"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1076" y="138.98050974512745"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="RjZ-R4-RUp">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="ybR-5s-gv3" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="i3a-pu-BiW">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="rootViewController" id="izg-nu-FWP"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="i4r-bd-vb2" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="136.80000000000001" y="792.95352323838085"/>
</scene>
</scenes>
</document>
37 changes: 34 additions & 3 deletions Example/BLAlert/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,49 @@
//

import UIKit
import BLAlert
import SafariServices

class ViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}


@IBAction func error(_ sender: Any) {
Alert.showError(title: "🚫 Short Error Title", message: "Something really messed up\nLine breaks are no problem")
}
@IBAction func warning(_ sender: Any) {
Alert.showWarning(title: "⚠️ Attention",
message: "Did you already stared Alert on Github?\nTouch me to do so ❤️",
actionClosure: { [weak self] in
self?.openWebView()

})
}

@IBAction func success(_ sender: Any) {
Alert.showSuccess(title: "✅ Sucess", message: "You sucessfully stared Alert on github 👍") {
print("Success dismissed")
}
}
@IBAction func custom(_ sender: Any) {
Alert.showCustomAlert(title: "😱 Custom Alert Title", message: "Colors are beautiful\nDuration is changeable as well", textColor: .green, backgroundColor: UIColor.purple.withAlphaComponent(0.5), duration: 1.0)
}

}

extension ViewController {
func openWebView() {
let url = URL(string: "https://github.com/B-Lach/Alert")!

let vc = SFSafariViewController(url: url)
present(vc, animated: true, completion: nil)
}
}
16 changes: 16 additions & 0 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PODS:
- BLAlert (0.1.0)

DEPENDENCIES:
- BLAlert (from `../`)

EXTERNAL SOURCES:
BLAlert:
:path: "../"

SPEC CHECKSUMS:
BLAlert: e2d1e8127b7b1d5901a498da592110f8ec359dd2

PODFILE CHECKSUM: 0a934a36e79ecee7c3abd7ee3d7edd6ddb94e329

COCOAPODS: 1.2.0
22 changes: 22 additions & 0 deletions Example/Pods/Local Podspecs/BLAlert.podspec.json

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

16 changes: 16 additions & 0 deletions Example/Pods/Manifest.lock

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

Loading

0 comments on commit e994081

Please sign in to comment.