Skip to content

Commit

Permalink
Develop (#8)
Browse files Browse the repository at this point in the history
* Various in WIP

* add IBScrollView

Update files header

update addSubviews to be Self typed

Delete IBScrollView and exhence involvesOwnerView to support UILayoutGuide

comment callAsFunction to help Swift type resolver resolve superviews

comment ibsubview without superview to help swift type resolver to resolve superviews

add explicit Void expression block to try improve superview typing in ibAttributes

Revert code added to improve ibAttributes superview type resolver. Problem is present when using expressions within ibAttributes which use implicit assignation

Remove UIViewKitPreviewsDemo library which useful for developement pourposes of UIViewKit, Add IBControl

Add support for Swiftlint locally and on CI

fix import was indicating older name

* Fix after cherry-picks

* Fix lint warnings

* Add IBFreeFormViewControllerRepresentable, ibAdd

* execute CI

* execute CI

* Move ibSetAsRootView to dedicated file

* Add IBFreeFormViewControllerRepresentable

* Update xcodeproj for Carthage

* fix 'IBFreeFormViewControllerRepresentable<ViewController>' initializer is inaccessible due to 'internal' protection level

* Add IBFreeFormViewControllerRepresentable

* Update files structure and add showColors in UIViewDebug

* Add ibRemove methods for UIViewControllers to work with ContainerViews

* Update code syntax of code samples in README

* Add IBRepresentableForViewSizeThatFits

* Improve IBRepresentableX for some rare cases and removes generics, move ibSetAsRootView to UIViewController extension

* update organization of code in files

* ibConstraints removed from UIViewDSL extension to become freestanding function

* Move some members to dedicated files, renames

* Mark constraints identifier for diagnostics purposes

* swiftlint fix

* Keep UIViewKit.scheme and delete others
  • Loading branch information
Adobels authored Nov 28, 2023
1 parent 6eb6653 commit beb85d1
Show file tree
Hide file tree
Showing 54 changed files with 1,277 additions and 992 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: SwiftLint

on: [pull_request]

jobs:
swiftlint:
runs-on: macos-latest

steps:
- name: Check out source code
uses: actions/checkout@v2

- name: Install SwiftLint
run: brew install swiftlint

- name: Run SwiftLint
run: swiftlint

6 changes: 6 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
disabled_rules:
- type_name
- line_length
- identifier_name
- trailing_comma
opt_in_rules:
106 changes: 0 additions & 106 deletions .swiftpm/xcode/xcshareddata/xcschemes/UIViewKit-Package.xcscheme

This file was deleted.

28 changes: 27 additions & 1 deletion .swiftpm/xcode/xcshareddata/xcschemes/UIViewKit.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
LastUpgradeVersion = "1510"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -20,6 +20,20 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "UIViewKitTests"
BuildableName = "UIViewKitTests"
BlueprintName = "UIViewKitTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand All @@ -28,6 +42,18 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "UIViewKitTests"
BuildableName = "UIViewKitTests"
BlueprintName = "UIViewKitTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down

This file was deleted.

13 changes: 5 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,22 @@ import PackageDescription
let package = Package(
name: "UIViewKit",
platforms: [
.iOS(.v13),
.iOS(.v13)
],
products: [
.library(
name: "UIViewKit",
targets: ["UIViewKit"]
),
.library(name: "UIViewKitPreviewsDemo", targets: ["UIViewKitPreviewsDemo"])
.library(name: "UIViewKit", targets: ["UIViewKit"]),
// .library(name: "UIViewKitDevelopmentViews", targets: ["UIViewKitDevelopmentViews"])
],
targets: [
.target(
name: "UIViewKit"
),
.target(
name: "UIViewKitPreviewsDemo",
name: "UIViewKitDevelopmentViews",
dependencies: ["UIViewKit"]
),
.testTarget(
name: "UIViewKitTests",
dependencies: ["UIViewKit", "UIViewKitPreviewsDemo"]),
dependencies: ["UIViewKit", "UIViewKitDevelopmentViews"])
]
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ import SwiftUI

struct ViewControllerPreviews: PreviewProvider {
static var previews: some View {
PreviewViewController(ViewControllerComplex())
IBRepresentableFreeFormViewController(ViewControllerComplex())
}
}

Expand Down

This file was deleted.

Loading

0 comments on commit beb85d1

Please sign in to comment.