Skip to content

Commit

Permalink
Revert "fix #48 FastisView for presentation in SwiftUI"
Browse files Browse the repository at this point in the history
This reverts commit 2c1723c.
  • Loading branch information
ilia3546 committed Mar 14, 2024
1 parent 2c1723c commit d8b884d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 324 deletions.
10 changes: 1 addition & 9 deletions Example/FastisExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
1A3E7A5E2A40901600434229 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1A3E7A602A40901600434229 /* Localizable.strings */; };
1AC064EF2BA2E6DB003AFCCE /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AC064EE2BA2E6DB003AFCCE /* MainView.swift */; };
1AC064F32BA2E708003AFCCE /* HostingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AC064F22BA2E708003AFCCE /* HostingController.swift */; };
F381AF9628B8C7190046383A /* Fastis in Frameworks */ = {isa = PBXBuildFile; productRef = F381AF9528B8C7190046383A /* Fastis */; };
F3FCEE47244780FE000F966E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3FCEE46244780FE000F966E /* AppDelegate.swift */; };
F3FCEE4B244780FE000F966E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3FCEE4A244780FE000F966E /* ViewController.swift */; };
Expand All @@ -21,8 +19,6 @@
1A3E7A5F2A40901600434229 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
1A3E7A612A40902000434229 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Localizable.strings; sourceTree = "<group>"; };
1A3E7A622A409B3A00434229 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
1AC064EE2BA2E6DB003AFCCE /* MainView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = "<group>"; };
1AC064F22BA2E708003AFCCE /* HostingController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HostingController.swift; sourceTree = "<group>"; };
CB137E4877EBDC6E87A77A4B /* Pods_FastisExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FastisExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F31CFB6B28B8C32D00364F6A /* Fastis */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Fastis; path = ..; sourceTree = "<group>"; };
F3FCEE43244780FE000F966E /* FastisExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FastisExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -83,8 +79,6 @@
isa = PBXGroup;
children = (
F3FCEE46244780FE000F966E /* AppDelegate.swift */,
1AC064EE2BA2E6DB003AFCCE /* MainView.swift */,
1AC064F22BA2E708003AFCCE /* HostingController.swift */,
F3FCEE4A244780FE000F966E /* ViewController.swift */,
F3FCEE4F24478100000F966E /* Assets.xcassets */,
F3FCEE5124478100000F966E /* LaunchScreen.storyboard */,
Expand Down Expand Up @@ -170,10 +164,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1AC064F32BA2E708003AFCCE /* HostingController.swift in Sources */,
F3FCEE4B244780FE000F966E /* ViewController.swift in Sources */,
F3FCEE47244780FE000F966E /* AppDelegate.swift in Sources */,
1AC064EF2BA2E6DB003AFCCE /* MainView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
24 changes: 0 additions & 24 deletions Example/Source/HostingController.swift

This file was deleted.

110 changes: 0 additions & 110 deletions Example/Source/MainView.swift

This file was deleted.

26 changes: 5 additions & 21 deletions Example/Source/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,10 @@ class ViewController: UIViewController {
return button
}()

private lazy var chooseRangeButtonWithCustomCalendar: UIButton = {
private lazy var chooseSingleButtonWithCustomCalendar: UIButton = {
let button = UIButton(type: .system)
button.setTitle("Choose range of dates with custom calendar", for: .normal)
button.addTarget(self, action: #selector(self.chooseRangeWithCustomCalendar), for: .touchUpInside)
return button
}()

private lazy var chooseWithSwiftUI: UIButton = {
let button = UIButton(type: .system)
button.setTitle("Choose with SwiftUI", for: .normal)
button.addTarget(self, action: #selector(self.swiftUIPresentation), for: .touchUpInside)
button.setTitle("Choose single date with custom calendar", for: .normal)
button.addTarget(self, action: #selector(self.chooseSingleDateWithCustomCalendar), for: .touchUpInside)
return button
}()

Expand Down Expand Up @@ -98,8 +91,7 @@ class ViewController: UIViewController {
self.containerView.setCustomSpacing(32, after: self.currentDateLabel)
self.containerView.addArrangedSubview(self.chooseRangeButton)
self.containerView.addArrangedSubview(self.chooseSingleButton)
self.containerView.addArrangedSubview(self.chooseRangeButtonWithCustomCalendar)
self.containerView.addArrangedSubview(self.chooseWithSwiftUI)
self.containerView.addArrangedSubview(self.chooseSingleButtonWithCustomCalendar)
self.view.addSubview(self.containerView)
}

Expand Down Expand Up @@ -157,7 +149,7 @@ class ViewController: UIViewController {
}

@objc
private func chooseRangeWithCustomCalendar() {
private func chooseSingleDateWithCustomCalendar() {
var customConfig: FastisConfig = .default
var calendar: Calendar = .init(identifier: .islamicUmmAlQura)
calendar.locale = .autoupdatingCurrent
Expand All @@ -183,12 +175,4 @@ class ViewController: UIViewController {
fastisController.present(above: self)
}

@objc
private func swiftUIPresentation() {
let hostingController = HostingController()
hostingController.modalPresentationStyle = .custom
let navVC = self.parent as? UINavigationController
navVC?.pushViewController(hostingController, animated: true)
}

}
160 changes: 0 additions & 160 deletions Sources/Views/FastisView.swift

This file was deleted.

0 comments on commit d8b884d

Please sign in to comment.