Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Lower required Swift version to 5.1 #1

Merged
merged 6 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: macOS-latest
strategy:
matrix:
action: [build, archive]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.5.0
with:
access_token: ${{ github.token }}
- name: Git Checkout
uses: actions/checkout@v2
- name: ${{ matrix.action }}
run: |
xcodebuild -sdk iphoneos -scheme MultiSheet clean ${{ matrix.action }} | xcpretty
exit ${PIPESTATUS[0]}
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
13 changes: 7 additions & 6 deletions Sources/MultiSheet/MultiSheetPreview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ struct MultiSheetDemoView_Previews: PreviewProvider {

var body: some View {
VStack(spacing: 20) {
Button("Sheet A") { sheetAPresented = true }
Button("Sheet B") { sheetBPresented = true }
Button("Sheet C") { sheetCPresented = true }
Button("Sheet A") { self.sheetAPresented = true }
Button("Sheet B") { self.sheetBPresented = true }
Button("Sheet C") { self.sheetCPresented = true }
}
.multiSheet {
$0.sheet(isPresented: $sheetAPresented) { Text("Sheet A") }
Expand All @@ -27,16 +27,17 @@ struct MultiSheetDemoView_Previews: PreviewProvider {

var body: some View {
VStack(spacing: 20) {
Button("Sheet A") { sheetAPresented = true }
Button("Sheet B") { sheetBPresented = true }
Button("Sheet C") { sheetCPresented = true }
Button("Sheet A") { self.sheetAPresented = true }
Button("Sheet B") { self.sheetBPresented = true }
Button("Sheet C") { self.sheetCPresented = true }
}
.sheet(isPresented: $sheetAPresented) { Text("Sheet A") }
.sheet(isPresented: $sheetBPresented) { Text("Sheet B") }
.sheet(isPresented: $sheetCPresented) { Text("Sheet C") }
}
}

@ViewBuilder
static var previews: some View {
MultiSheetDemoView().previewDisplayName("With MultiSheet")
NoMultiSheetDemoView().previewDisplayName("Without MultiSheet")
Expand Down