Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
omidgolparvar committed Oct 4, 2020
1 parent a17528f commit e5f69e2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 38 deletions.
9 changes: 6 additions & 3 deletions IDAlertController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1010;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Omid Golparvar";
TargetAttributes = {
1A16563F227863A90085E9EF = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1200;
};
};
};
Expand Down Expand Up @@ -252,6 +253,7 @@
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;
Expand Down Expand Up @@ -313,6 +315,7 @@
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;
Expand Down Expand Up @@ -356,7 +359,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = io.idco.ios.test.IDAlertController;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -375,7 +378,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = io.idco.ios.test.IDAlertController;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Binary file not shown.
13 changes: 2 additions & 11 deletions IDAlertController/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
//
// AppDelegate.swift
// IDAlertController
//
// Created by Omid Golparvar on 4/30/19.
// Copyright © 2019 Omid Golparvar. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

IDAlertHeader.TitleFont = UIFont(name: "Vazir-Bold", size: 16)!
Expand Down
8 changes: 0 additions & 8 deletions IDAlertController/CustomView.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
//
// CustomView.swift
// IDAlertController
//
// Created by Omid Golparvar on 5/3/19.
// Copyright © 2019 Omid Golparvar. All rights reserved.
//

import UIKit

class CustomView: UIView {
Expand Down
29 changes: 13 additions & 16 deletions IDAlertController/ViewController.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
//
// ViewController.swift
// IDAlertController
//
// Created by Omid Golparvar on 4/30/19.
// Copyright © 2019 Omid Golparvar. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
final class ViewController: UIViewController {

@IBOutlet weak var segment_AlertStyle : UISegmentedControl!
@IBOutlet weak var button_PresentWithTitleAndMessage : UIButton!
Expand All @@ -18,11 +10,16 @@ class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

[button_PresentWithTitleAndMessage!, button_PresentWithCustomHeaderView!, button_PresentWithTitleAndSubtitle!].forEach {
$0.layer.cornerRadius = 6
$0.clipsToBounds = true
$0.layer.borderColor = $0.tintColor.cgColor
$0.layer.borderWidth = 1.0
let buttons = [
button_PresentWithTitleAndMessage!,
button_PresentWithCustomHeaderView!,
button_PresentWithTitleAndSubtitle!
]
buttons.forEach { button in
button.layer.cornerRadius = 6
button.clipsToBounds = true
button.layer.borderColor = button.tintColor.cgColor
button.layer.borderWidth = 1.0
}
}

Expand Down Expand Up @@ -109,7 +106,7 @@ class ViewController: UIViewController {
permittedArrowDirections : [.up, .down]
)

self.present(idAlertController, animated: true, completion: nil)
present(idAlertController, animated: true, completion: nil)

}

Expand Down Expand Up @@ -162,7 +159,7 @@ class ViewController: UIViewController {
permittedArrowDirections : [.up, .down]
)

self.present(idAlertController, animated: true, completion: nil)
present(idAlertController, animated: true, completion: nil)

}

Expand Down

0 comments on commit e5f69e2

Please sign in to comment.