This is an internal library, not intended for use outside of YipYip.
Current version: 2.2.1
To run the example project, clone the repo, and run pod install
from the Example directory first.
YipYipSwift is available privately through CocoaPods or SPM.
To install it, simply add the following lines to your Podfile:
source '[email protected]:weareyipyip/YipYip-CocoaPods.git'
pod "YipYipSwift"
or
pod 'YipYipSwift', :git => '[email protected]:weareyipyip/YipYipSwift.git'
To install it, follow the steps below.
Open the project in Xcode -> Click File -> Swift Packages -> Add Package Dependency, enter the repo url. Make sure you have logged in with your Github account in Xcode
After select the package, you can choose the dependency type (tagged version, branch or commit). Then Xcode will setup all the stuff for you.
YipYipHostingController
and YipYipHostingView
are protocols which will accomodate the placement of a UIHostingController to be able to use SwiftUI views in a UIKit environment. Implement the required methods/properties and call self.placeContentView()
to place the SwiftUI view. Both views use the YipYipEmbeddedHostingController
to keep control of the navigation controller in the parent view/viewcontroller.
For an example of the YipYipHostingController
, see SwiftUIViewController
in the example project.
For an example of the YipYipHostingView
, see ButtonViewHostingView
and SwiftUIDemoViewController
in the example project.
YipYipIntrinsicWidthRepresentable
and YipYipIntrinsicHeightRepresentable
are protocols which will accomodate the placement of UIKit views in a SwiftUI environment. Both protocols rely on their own type of container view to layout the view properly, since SwiftUI's layout mechanism works different from autolayout in UIKit.
For an example see SwiftUIMain
, CardViewIntrinsicHeightRepresentable
and CardViewIntrinsicWidthRepresentable
in the example project.
- Marcel Bloemendaal, YipYip B.V. ([email protected])
- Rens Wijnmalen, YipYip B.V. ([email protected])
- Lars Moesman, YipYip B.V. ([email protected])