Skip to content

Commit

Permalink
Merge pull request #4 from vytick/swift3
Browse files Browse the repository at this point in the history
updated to Swift3 and version 0.2.0
  • Loading branch information
rafiki270 authored Oct 25, 2016
2 parents 2d576a4 + 4d1017a commit bc0c8b8
Show file tree
Hide file tree
Showing 58 changed files with 2,958 additions and 2,182 deletions.
4 changes: 2 additions & 2 deletions DialogView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "DialogView"
s.version = "0.1.3"
s.version = "0.2.0"
s.summary = "Highly customisable dialog (alert) view made in swift."

s.description = "You can customise pretty much anything prom inner paddings and margins to all colors and views. Please refer to the README.md for instructions"
Expand All @@ -30,5 +30,5 @@ Pod::Spec.new do |s|

# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
s.dependency 'SnapKit', '~> 0.20.0'
s.dependency 'SnapKit', '~> 3.0'
end
52 changes: 32 additions & 20 deletions Example/DialogView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "DialogView_Example" */;
buildPhases = (
F66F26A59919B9561B3FED2D /* 📦 Check Pods Manifest.lock */,
F66F26A59919B9561B3FED2D /* [CP] Check Pods Manifest.lock */,
607FACCC1AFB9204008FA782 /* Sources */,
607FACCD1AFB9204008FA782 /* Frameworks */,
607FACCE1AFB9204008FA782 /* Resources */,
73352EA91C8106DF91B88A58 /* 📦 Embed Pods Frameworks */,
47F352B51038106AFA540F00 /* 📦 Copy Pods Resources */,
73352EA91C8106DF91B88A58 /* [CP] Embed Pods Frameworks */,
47F352B51038106AFA540F00 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -186,12 +186,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "DialogView_Tests" */;
buildPhases = (
B4CA5D581390463C0038FB83 /* 📦 Check Pods Manifest.lock */,
B4CA5D581390463C0038FB83 /* [CP] Check Pods Manifest.lock */,
607FACE11AFB9204008FA782 /* Sources */,
607FACE21AFB9204008FA782 /* Frameworks */,
607FACE31AFB9204008FA782 /* Resources */,
C0CBA8B8375C2B2D2BCC25D5 /* 📦 Embed Pods Frameworks */,
90350B864DB1CA2678B84C3C /* 📦 Copy Pods Resources */,
C0CBA8B8375C2B2D2BCC25D5 /* [CP] Embed Pods Frameworks */,
90350B864DB1CA2678B84C3C /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -215,9 +215,13 @@
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = YAY8QNNRBC;
LastSwiftMigration = 0800;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = 3T3Q9PBUAH;
LastSwiftMigration = 0800;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
Expand Down Expand Up @@ -262,94 +266,94 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
47F352B51038106AFA540F00 /* 📦 Copy Pods Resources */ = {
47F352B51038106AFA540F00 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
73352EA91C8106DF91B88A58 /* 📦 Embed Pods Frameworks */ = {
73352EA91C8106DF91B88A58 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Embed Pods Frameworks";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DialogView_Example/Pods-DialogView_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
90350B864DB1CA2678B84C3C /* 📦 Copy Pods Resources */ = {
90350B864DB1CA2678B84C3C /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
B4CA5D581390463C0038FB83 /* 📦 Check Pods Manifest.lock */ = {
B4CA5D581390463C0038FB83 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
C0CBA8B8375C2B2D2BCC25D5 /* 📦 Embed Pods Frameworks */ = {
C0CBA8B8375C2B2D2BCC25D5 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Embed Pods Frameworks";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DialogView_Tests/Pods-DialogView_Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
F66F26A59919B9561B3FED2D /* 📦 Check Pods Manifest.lock */ = {
F66F26A59919B9561B3FED2D /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -489,11 +493,13 @@
baseConfigurationReference = CDDEBB171A917374C426EDDF /* Pods-DialogView_Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = YAY8QNNRBC;
INFOPLIST_FILE = DialogView/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -502,11 +508,13 @@
baseConfigurationReference = C6E3288F152D980F207E9701 /* Pods-DialogView_Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = YAY8QNNRBC;
INFOPLIST_FILE = DialogView/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -515,6 +523,7 @@
baseConfigurationReference = 32B4816DA5CEB8CAFEFE689A /* Pods-DialogView_Tests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = 3T3Q9PBUAH;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
Expand All @@ -527,6 +536,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DialogView_Example.app/DialogView_Example";
};
name = Debug;
Expand All @@ -536,6 +546,7 @@
baseConfigurationReference = 51FD60226455F61677BEEAF6 /* Pods-DialogView_Tests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = 3T3Q9PBUAH;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
Expand All @@ -544,6 +555,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DialogView_Example.app/DialogView_Example";
};
name = Release;
Expand Down
12 changes: 6 additions & 6 deletions Example/DialogView/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(application: UIApplication) {
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(application: UIApplication) {
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(application: UIApplication) {
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(application: UIApplication) {
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(application: UIApplication) {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

Expand Down
26 changes: 13 additions & 13 deletions Example/DialogView/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ import DialogView
class ViewController: UIViewController {


@IBAction func giveMeDialogView(sender: UIButton) {
@IBAction func giveMeDialogView(_ sender: UIButton) {
let alert: DialogView = DialogView()
alert.setTitle("Dialog Title")
alert.setMessage("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a augue eget felis dictum ultrices ac a arcu.")

let button: DialogButton = alert.addButton("Ok", type: .Done)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
let button: DialogButton = alert.addButton("Ok", type: .done)
button.addTarget(self, action: "myAlertAction:", for: .touchUpInside)
alert.showInController(self)
}

@IBAction func giveMeAdvancedDialogView(sender: UIButton) {
@IBAction func giveMeAdvancedDialogView(_ sender: UIButton) {
let alert: DialogView = DialogView()

var attr: [String: AnyObject] = [String: AnyObject]();
Expand All @@ -33,28 +33,28 @@ class ViewController: UIViewController {
attr[NSFontAttributeName] = UIFont.init(name: "HelveticaNeue-UltraLight", size: 14)!
alert.setMessage("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a augue eget felis dictum ultrices ac a arcu.", attributes: attr)

var button: DialogButton = alert.addButton("Accept", type: .Accept)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
var button: DialogButton = alert.addButton("Accept", type: .accept)
button.addTarget(self, action: #selector(ViewController.myAlertAction(_:)), for: .touchUpInside)
button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)!

button = alert.addButton("Delete", type: .Destruct)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
button = alert.addButton("Delete", type: .destruct)
button.addTarget(self, action: #selector(ViewController.myAlertAction(_:)), for: .touchUpInside)
button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)!

button = alert.addButton("Done", type: .Done)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
button = alert.addButton("Done", type: .done)
button.addTarget(self, action: #selector(ViewController.myAlertAction(_:)), for: .touchUpInside)
button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)!

button = alert.addButton("Default", type: .Default)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
button = alert.addButton("Default", type: .default)
button.addTarget(self, action: #selector(ViewController.myAlertAction(_:)), for: .touchUpInside)
button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)!

alert.showInController(self)
}

// MARK: Alert actions

func myAlertAction(sender: DialogButton) {
func myAlertAction(_ sender: DialogButton) {
sender.dialogView.hide(true)
}

Expand Down
8 changes: 2 additions & 6 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ use_frameworks!

target 'DialogView_Example' do
pod 'DialogView', :path => '../'
pod 'SnapKit', '~> 0.20.0'
pod 'SnapKit', '~> 3.0'
end

target 'DialogView_Tests' do
pod 'DialogView', :path => '../'

#pod 'Quick', '~> 0.8'
#pod 'Nimble', '~> 3.0'
#pod 'FBSnapshotTestCase'
#pod 'Nimble-Snapshots'
pod 'SnapKit', '~> 0.20.0'
pod 'SnapKit', '~> 3.0'
end
18 changes: 9 additions & 9 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PODS:
- DialogView (0.1.1):
- SnapKit (~> 0.20.0)
- SnapKit (0.20.0)
- DialogView (0.2.0):
- SnapKit (~> 3.0)
- SnapKit (3.0.0)

DEPENDENCIES:
- DialogView (from `../`)
- SnapKit (~> 0.20.0)
- SnapKit (~> 3.0)

EXTERNAL SOURCES:
DialogView:
:path: "../"
:path: ../

SPEC CHECKSUMS:
DialogView: 6ee9afb190d8916094196beae3f1ae7faa5bf071
SnapKit: 5fce3c1bbbf1fbd31de9aa92f33eb9fa03f15650
DialogView: 448410f7d30f60092bc62b98b072a61a8b80818f
SnapKit: 98af0a4e9369d3c58f758967518081dbdc7eb1d9

PODFILE CHECKSUM: 745a7afc48ddc703d332f60a1e90a082b8f72f49
PODFILE CHECKSUM: 56bad7dc7b58bee02e37a5b8dd070b76c0814759

COCOAPODS: 1.0.0.beta.6
COCOAPODS: 1.1.0.rc.2
Loading

0 comments on commit bc0c8b8

Please sign in to comment.