diff --git a/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS.xcodeproj/project.pbxproj b/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS.xcodeproj/project.pbxproj index 7362d7e..7b9139c 100644 --- a/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS.xcodeproj/project.pbxproj +++ b/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - D302459725C1139D00B89EFA /* BarChart in Frameworks */ = {isa = PBXBuildFile; productRef = D302459625C1139D00B89EFA /* BarChart */; }; D3A6EEC224D294C500DEED1B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3A6EEC124D294C500DEED1B /* AppDelegate.swift */; }; D3A6EEC424D294C500DEED1B /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3A6EEC324D294C500DEED1B /* SceneDelegate.swift */; }; D3A6EEC624D294C500DEED1B /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3A6EEC524D294C500DEED1B /* ContentView.swift */; }; @@ -21,6 +20,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + D399CB01265C802500A92054 /* BarChart */ = {isa = PBXFileReference; lastKnownFileType = folder; name = BarChart; path = ../..; sourceTree = ""; }; D3A6EEBE24D294C500DEED1B /* SelectableBarChartExample-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SelectableBarChartExample-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; D3A6EEC124D294C500DEED1B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; D3A6EEC324D294C500DEED1B /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -40,7 +40,6 @@ buildActionMask = 2147483647; files = ( D3A6EEDE24D2963600DEED1B /* BarChart in Frameworks */, - D302459725C1139D00B89EFA /* BarChart in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -50,6 +49,7 @@ D3A6EEB524D294C500DEED1B = { isa = PBXGroup; children = ( + D399CB01265C802500A92054 /* BarChart */, D3A6EEC024D294C500DEED1B /* SelectableBarChartExample-iOS */, D3A6EEBF24D294C500DEED1B /* Products */, ); @@ -106,7 +106,6 @@ name = "SelectableBarChartExample-iOS"; packageProductDependencies = ( D3A6EEDD24D2963600DEED1B /* BarChart */, - D302459625C1139D00B89EFA /* BarChart */, ); productName = "SelectableBarChartExample-iOS"; productReference = D3A6EEBE24D294C500DEED1B /* SelectableBarChartExample-iOS.app */; @@ -119,7 +118,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1160; - LastUpgradeCheck = 1160; + LastUpgradeCheck = 1240; ORGANIZATIONNAME = "Roman Baitaliuk"; TargetAttributes = { D3A6EEBD24D294C500DEED1B = { @@ -137,7 +136,6 @@ ); mainGroup = D3A6EEB524D294C500DEED1B; packageReferences = ( - D302459525C1139D00B89EFA /* XCRemoteSwiftPackageReference "BarChart" */, ); productRefGroup = D3A6EEBF24D294C500DEED1B /* Products */; projectDirPath = ""; @@ -215,6 +213,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; @@ -275,6 +274,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; @@ -370,23 +370,7 @@ }; /* End XCConfigurationList section */ -/* Begin XCRemoteSwiftPackageReference section */ - D302459525C1139D00B89EFA /* XCRemoteSwiftPackageReference "BarChart" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/dawigr/BarChart.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.3.1; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - /* Begin XCSwiftPackageProductDependency section */ - D302459625C1139D00B89EFA /* BarChart */ = { - isa = XCSwiftPackageProductDependency; - package = D302459525C1139D00B89EFA /* XCRemoteSwiftPackageReference "BarChart" */; - productName = BarChart; - }; D3A6EEDD24D2963600DEED1B /* BarChart */ = { isa = XCSwiftPackageProductDependency; productName = BarChart; diff --git a/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 849b9e0..0000000 --- a/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "BarChart", - "repositoryURL": "https://github.com/dawigr/BarChart.git", - "state": { - "branch": null, - "revision": "6dea1ef71e4d113644ac2c9ded0b93706867e30e", - "version": "1.3.1" - } - } - ] - }, - "version": 1 -} diff --git a/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS/ContentView.swift b/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS/ContentView.swift index 6e36dc6..70b7c2b 100644 --- a/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS/ContentView.swift +++ b/Examples/SelectableBarChartExample-iOS/SelectableBarChartExample-iOS/ContentView.swift @@ -61,7 +61,11 @@ struct ContentView: View { self.resetSelection() } .onAppear() { - self.config.data.entries = self.randomEntries() + // SwiftUI bug, onAppear is called before the view frame is calculated + DispatchQueue.main.asyncAfter(deadline: .now() + 0.1, execute: { + self.config.data.entries = self.randomEntries() + self.config.objectWillChange.send() + }) } .navigationBarTitle(Text("SelectableBarChart")) } @@ -76,7 +80,7 @@ struct ContentView: View { self.selectionIndicatorView() self.chartView() } - .frame(height: self.chartHeight) + .frame(height: chartHeight) .padding(15) }