Skip to content

Commit a4578ca

Browse files
committed
Update
1 parent fe282ff commit a4578ca

File tree

2 files changed

+30
-21
lines changed

2 files changed

+30
-21
lines changed

.github/workflows/github-actions-ci.yml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,48 +18,45 @@ jobs:
1818
- name: Build PinLayout-iOS
1919
run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
2020

21-
# - name: Build PinLayout-tvOS
22-
# run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-tvOS -sdk appletvsimulator15.2 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=15.2' | xcpretty
21+
- name: Build PinLayout-tvOS
22+
run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-tvOS -sdk appletvsimulator15.2 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=15.2' | xcpretty
2323

24-
# - name: Build PinLayout-macOS
25-
# run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-macOS -sdk macosx12.1 | xcpretty
24+
- name: Build PinLayout-macOS
25+
run: set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-macOS -sdk macosx12.1 | xcpretty
2626

27-
# - name: Build PinLayoutSample - iOS 15.2
28-
# run: set -o pipefail && xcodebuild build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
27+
- name: Build PinLayoutSample - iOS 15.2
28+
run: set -o pipefail && xcodebuild build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
2929

30-
# # - name: Build PinLayoutSample - iOS 13.7
31-
# # run: set -o pipefail && xcodebuild build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator13.7 -destination 'platform=iOS Simulator,name=iPhone 8,OS=13.7' | xcpretty
32-
33-
# - name: iOS unit tests
34-
# run: set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
30+
- name: iOS unit tests
31+
run: set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty
3532

3633
# # - name: tvOS unit tests
3734
# # run: set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-tvOS -sdk appletvos15.2 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=15.2' | xcpretty
3835

3936
# # - name: macOS unit tests
4037
# # run: set -o pipefail && xcodebuild test -workspace PinLayout.xcworkspace -scheme PinLayout-macOS -sdk macosx12.1 -destination 'platform=macOS,name=Any Mac' | xcpretty
4138

42-
# - name: Cocoapods - iOS Empty project
43-
# run: set -o pipefail && cd TestProjects/cocoapods/ios && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-iOS.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && cd ../../..
39+
- name: Cocoapods - iOS Empty project
40+
run: set -o pipefail && cd TestProjects/cocoapods/ios && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-iOS.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && cd ../../..
4441

45-
# # - name: Cocoapods - macOS Empty project
46-
# # run: set -o pipefail && cd TestProjects/cocoapods/macos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-macOS.xcworkspace -scheme PinLayout-macOS -sdk macosx12.1 | xcpretty && cd ../../..
42+
# - name: Cocoapods - macOS Empty project
43+
# run: set -o pipefail && cd TestProjects/cocoapods/macos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-macOS.xcworkspace -scheme PinLayout-macOS -sdk macosx12.1 | xcpretty && cd ../../..
4744

48-
# # - name: Cocoapods - tvOS Empty project
49-
# # run: set -o pipefail && cd TestProjects/cocoapods/tvos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-tvOS.xcworkspace -scheme PinLayout-tvOS -sdk appletvsimulator15.2 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=15.2' | xcpretty && cd ../../..
45+
# - name: Cocoapods - tvOS Empty project
46+
# run: set -o pipefail && cd TestProjects/cocoapods/tvos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-tvOS.xcworkspace -scheme PinLayout-tvOS -sdk appletvsimulator15.2 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=15.2' | xcpretty && cd ../../..
5047

5148
# # - name: Carthage - iOS Empty project
5249
# # run: set -o pipefail && cd TestProjects/carthage/ios && rm Cartfile && echo "git \"file:///$BASEDIR\"" > Cartfile && carthage update --use-ssh --platform iOS --use-xcframeworks && xcodebuild build -project PinLayout-Carthage-iOS.xcodeproj -scheme PinLayout-Carthage-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && rm Cartfile.resolved && cd ../../..
5350

54-
# - name: Swift Package Manager - iOS Empty project
55-
# run: set -o pipefail && cd TestProjects/swift-package-manager/ios && rm -rf .build && xcodebuild build -project PinLayout-SPM-iOS.xcodeproj -scheme PinLayout-SPM-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && cd ../../..
51+
- name: Swift Package Manager - iOS Empty project
52+
run: set -o pipefail && cd TestProjects/swift-package-manager/ios && rm -rf .build && xcodebuild build -project PinLayout-SPM-iOS.xcodeproj -scheme PinLayout-SPM-iOS -sdk iphonesimulator15.2 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.2' | xcpretty && cd ../../..
5653

57-
- name: Set XCode Version 12.5.1
54+
- name: Set XCode Version 12.5.1 (iOS 14)
5855
run: sudo xcode-select -s /Applications/Xcode_12.5.1.app
5956
- name: Build PinLayoutSample - iOS 14.5
6057
run: set -o pipefail && xcodebuild build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator14.5 -destination 'platform=iOS Simulator,name=iPhone 8,OS=14.5' | xcpretty
6158

62-
- name: Set XCode Version 11.7
59+
- name: Set XCode Version 11.7 (iOS 13)
6360
run: sudo xcode-select -s /Applications/Xcode_11.7.app
6461
- name: Build PinLayoutSample - iOS 13.7
6562
run: set -o pipefail && xcodebuild build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator13.7 -destination 'platform=iOS Simulator,name=iPhone 8,OS=13.7' | xcpretty

Example/PinLayoutSample/UI/Menu/MenuView.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,15 @@ extension MenuView: UITableViewDelegate {
7676
tableView.deselectRow(at: indexPath, animated: true)
7777
}
7878
}
79+
80+
// MARK: PinLayout validation
81+
extension MenuView {
82+
private func validation() {
83+
// Compilation validation
84+
#if compiler(>=5.5)
85+
// iOS 15+
86+
_ = tableView.pin.keyboardMargins
87+
#endif
88+
}
89+
90+
}

0 commit comments

Comments
 (0)