-
Notifications
You must be signed in to change notification settings - Fork 0
Add project and static library #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9e81a69
Add project and static library
jonathanantoine 8920871
remove property from build file
jonathanantoine 874df56
workflow now target main branch
jonathanantoine dcafa8d
add api definition and enums
jonathanantoine 1c7ca40
fix project name
jonathanantoine c8e278e
update namespaces
jonathanantoine f93b995
update namespace
jonathanantoine 436bae7
move SWRevealViewControllerSegueSetController in main class
jonathanantoine 469b412
typo in build file
jonathanantoine b51b46d
add readme content
jonathanantoine 451ef1b
Update namespace to SWRevealViewControllerMaui
jonathanantoine a60709d
building Library and not framework
jonathanantoine 3c4d70f
Library = Static
jonathanantoine 655c8ad
update version
jonathanantoine ac0393b
Give usage example in the readme.
jonathanantoine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Build nuget package | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: macos-latest | ||
| env: | ||
| SDK: 17.5 | ||
| SRC_FOLDER: . | ||
| # PROJ_NAME: SWRevealViewController.xcodeproj | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install .NET 9 | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '9.x' | ||
| # | ||
| # | ||
| # - name: Build MBProgressHUD iphonesimulator Framework | ||
| # run: | | ||
| # xcodebuild -project ${{ env.SRC_FOLDER }}/${{ env.PROJ_NAME }} \ | ||
| # -target "MBProgressHUD Framework" \ | ||
| # -sdk iphonesimulator${{ env.SDK }} \ | ||
| # | ||
| # - name: Build MBProgressHUD iphonesimulator Framework | ||
| # run: | | ||
| # xcodebuild -project ${{ env.SRC_FOLDER }}/${{ env.PROJ_NAME }} \ | ||
| # -target "MBProgressHUD Framework" \ | ||
| # -sdk iphoneos${{ env.SDK }} \ | ||
| # | ||
| # - name: Build xcframework | ||
| # run: | | ||
| # xcodebuild -create-xcframework \ | ||
| # -framework "${{ env.SRC_FOLDER }}/build/Release-iphonesimulator/MBProgressHUD.framework" \ | ||
| # -framework "${{ env.SRC_FOLDER }}/build/Release-iphoneos/MBProgressHUD.framework" \ | ||
| # -output ./dotnet-binding/MBProgressHUD.xcframework | ||
| # | ||
| # - name: Upload .xcframework as artifact | ||
| # uses: actions/upload-artifact@v4.6.2 | ||
| # with: | ||
| # name: xcframework | ||
| # compression-level: '1' | ||
| # path: ./dotnet-binding/SWRevealViewController.xcframework | ||
| # | ||
| - name: Restore workload | ||
| working-directory: ./SWRevealViewController | ||
| run: dotnet workload restore | ||
|
|
||
| - name: Build .NET binding project | ||
| working-directory: ./SWRevealViewController | ||
| run: dotnet build -c Release SWRevealViewController.csproj | ||
|
|
||
| - name: Pack NuGet | ||
| working-directory: ./SWRevealViewController | ||
| run: dotnet pack -c Release SWRevealViewController.csproj | ||
|
|
||
| - name: Upload .nupkg as artifact | ||
| uses: actions/upload-artifact@v4.6.2 | ||
| with: | ||
| name: SWRevealViewController-nuget-package | ||
| compression-level: '0' | ||
| path: SWRevealViewController/bin/Release/*.nupkg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,41 @@ | ||
| # SWRevealViewController-dotnet | ||
| .net bindings for the SWRevealViewController ios library | ||
| # Maui iOS binding for SWRevealViewController | ||
|
|
||
| [](https://badge.fury.io/nu/com.jonathanantoine.SWRevealViewController) | ||
|
|
||
| - Native library repository: [SWRevealViewController](https://github.com/John-Lluch/SWRevealViewController) | ||
|
|
||
| **Support Net 9.0 for iOS (works with Xcode 15 and iOS 17)** | ||
|
|
||
| ## Nuget | ||
|
|
||
| * `Install-Package com.jonathanantoine.SWRevealViewController` | ||
| * <https://www.nuget.org/packages/com.jonathanantoine.SWRevealViewController> | ||
|
|
||
| ## Compatibility | ||
| * Run on ios and ios simulator (arm64 + x86_64). | ||
|
|
||
| ## Build | ||
| * Run the GitHub action to build the project | ||
|
|
||
|
|
||
| ## Usage | ||
| Follow [this blog post to reference](https://medium.com/@jonathanantoine/how-to-add-a-local-nuget-nupkg-to-your-net-project-0254d222e2a6) it in your project if not yet published on Nuget. | ||
|
|
||
|
|
||
| ```csharp | ||
| using SWRevealViewControllerMaui; | ||
|
|
||
| var pageController = new MyPageController(); | ||
| pageController.ViewControllerSelected += pageControllerController_ViewControllerSelected; | ||
|
|
||
| var menuController = new MenuViewController(); | ||
|
|
||
| var swRevealViewController = new SWRevealViewController(menuController, pageController); | ||
| ``` | ||
|
|
||
| ## Contribution | ||
| Contribution to [ApiDefinition.cs](SWRevealViewController/ApiDefinition.cs) are welcome, just send PRs. | ||
|
|
||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| using System; | ||
| using CoreGraphics; | ||
| using Foundation; | ||
| using ObjCRuntime; | ||
| using System.Drawing; | ||
| using UIKit; | ||
|
|
||
| namespace SWRevealViewControllerMaui { | ||
|
|
||
| [BaseType (typeof (UIViewController))] | ||
| public partial interface SWRevealViewController | ||
| { | ||
| [Export ("initWithRearViewController:frontViewController:")] | ||
| IntPtr Constructor (UIViewController rearViewController, UIViewController frontViewController); | ||
|
|
||
| [Export ("rearViewController", ArgumentSemantic.Retain)] | ||
| UIViewController RearViewController { get; set; } | ||
|
|
||
| [Export ("setRearViewController:animated:")] | ||
| void SetRearViewController (UIViewController rearViewController, bool animated); | ||
|
|
||
| [Export ("rightViewController", ArgumentSemantic.Retain)] | ||
| UIViewController RightViewController { get; set; } | ||
|
|
||
| [Export ("setRightViewController:animated:")] | ||
| void SetRightViewController (UIViewController rightViewController, bool animated); | ||
|
|
||
| [Export ("frontViewController", ArgumentSemantic.Retain)] | ||
| UIViewController FrontViewController { get; set; } | ||
|
|
||
| [Export ("setFrontViewController:animated:")] | ||
| void SetFrontViewController (UIViewController frontViewController, bool animated); | ||
|
|
||
| [Export ("pushFrontViewController:animated:")] | ||
| void PushFrontViewController (UIViewController frontViewController, bool animated); | ||
|
|
||
| [Export ("frontViewPosition")] | ||
| FrontViewPosition FrontViewPosition { get; set; } | ||
|
|
||
| [Export ("setFrontViewPosition:animated:")] | ||
| void SetFrontViewPosition (FrontViewPosition frontViewPosition, bool animated); | ||
|
|
||
| [Export ("revealToggleAnimated:")] | ||
| void RevealToggleAnimated (bool animated); | ||
|
|
||
| [Export ("rightRevealToggleAnimated:")] | ||
| void RightRevealToggleAnimated (bool animated); | ||
|
|
||
| [Export ("revealToggle:")] | ||
| void RevealToggle (NSObject sender); | ||
|
|
||
| [Export ("rightRevealToggle:")] | ||
| void RightRevealToggle (NSObject sender); | ||
|
|
||
| [Export ("panGestureRecognizer")] | ||
| UIPanGestureRecognizer PanGestureRecognizer { get; } | ||
|
|
||
| [Export ("tapGestureRecognizer")] | ||
| UITapGestureRecognizer TapGestureRecognizer { get; } | ||
|
|
||
| [Export ("rearViewRevealWidth")] | ||
| float RearViewRevealWidth { get; set; } | ||
|
|
||
| [Export ("rightViewRevealWidth")] | ||
| float RightViewRevealWidth { get; set; } | ||
|
|
||
| [Export ("rearViewRevealOverdraw")] | ||
| float RearViewRevealOverdraw { get; set; } | ||
|
|
||
| [Export ("rightViewRevealOverdraw")] | ||
| float RightViewRevealOverdraw { get; set; } | ||
|
|
||
| [Export ("rearViewRevealDisplacement")] | ||
| float RearViewRevealDisplacement { get; set; } | ||
|
|
||
| [Export ("rightViewRevealDisplacement")] | ||
| float RightViewRevealDisplacement { get; set; } | ||
|
|
||
| [Export ("draggableBorderWidth")] | ||
| float DraggableBorderWidth { get; set; } | ||
|
|
||
| [Export ("bounceBackOnOverdraw")] | ||
| bool BounceBackOnOverdraw { get; set; } | ||
|
|
||
| [Export ("bounceBackOnLeftOverdraw")] | ||
| bool BounceBackOnLeftOverdraw { get; set; } | ||
|
|
||
| [Export ("stableDragOnOverdraw")] | ||
| bool StableDragOnOverdraw { get; set; } | ||
|
|
||
| [Export ("stableDragOnLeftOverdraw")] | ||
| bool StableDragOnLeftOverdraw { get; set; } | ||
|
|
||
| [Export ("presentFrontViewHierarchically")] | ||
| bool PresentFrontViewHierarchically { get; set; } | ||
|
|
||
| [Export ("quickFlickVelocity")] | ||
| float QuickFlickVelocity { get; set; } | ||
|
|
||
| [Export ("toggleAnimationDuration")] | ||
| double ToggleAnimationDuration { get; set; } | ||
|
|
||
| [Export ("replaceViewAnimationDuration")] | ||
| double ReplaceViewAnimationDuration { get; set; } | ||
|
|
||
| [Export ("frontViewShadowRadius")] | ||
| float FrontViewShadowRadius { get; set; } | ||
|
|
||
| [Export ("frontViewShadowOffset", ArgumentSemantic.Assign)] | ||
| SizeF FrontViewShadowOffset { get; set; } | ||
|
|
||
| [Export ("frontViewShadowOpacity")] | ||
| float FrontViewShadowOpacity { get; set; } | ||
|
|
||
| [Export ("delegate", ArgumentSemantic.Assign)] | ||
| SWRevealViewControllerDelegate Delegate { get; set; } | ||
| } | ||
|
|
||
| [Model, BaseType (typeof (NSObject))] | ||
| public partial interface SWRevealViewControllerDelegate | ||
| { | ||
| [Export ("revealController:willMoveToPosition:")] | ||
| void WillMoveToPosition (SWRevealViewController revealController, FrontViewPosition position); | ||
|
|
||
| [Export ("revealController:didMoveToPosition:")] | ||
| void DidMoveToPosition (SWRevealViewController revealController, FrontViewPosition position); | ||
|
|
||
| [Export ("revealController:animateToPosition:")] | ||
| void AnimateToPosition (SWRevealViewController revealController, FrontViewPosition position); | ||
|
|
||
| [Export ("revealControllerPanGestureShouldBegin:")] | ||
| bool PanGestureShouldBegin (SWRevealViewController revealController); | ||
|
|
||
| [Export ("revealControllerTapGestureShouldBegin:")] | ||
| bool TapGestureShouldBegin (SWRevealViewController revealController); | ||
|
|
||
| [Export ("revealControllerPanGestureBegan:")] | ||
| void PanGestureBegan (SWRevealViewController revealController); | ||
|
|
||
| [Export ("revealControllerPanGestureEnded:")] | ||
| void PanGestureEnded (SWRevealViewController revealController); | ||
|
|
||
| [Export ("revealController:panGestureBeganFromLocation:progress:")] | ||
| void PanGestureBeganFromLocation (SWRevealViewController revealController, float location, float progress); | ||
|
|
||
| [Export ("revealController:panGestureMovedToLocation:progress:")] | ||
| void PanGestureMovedToLocation (SWRevealViewController revealController, float location, float progress); | ||
|
|
||
| [Export ("revealController:panGestureEndedToLocation:progress:")] | ||
| void PanGestureEndedToLocation (SWRevealViewController revealController, float location, float progress); | ||
|
|
||
| [Export ("revealController:willAddViewController:forOperation:animated:")] | ||
| void WillAddViewController (SWRevealViewController revealController, UIViewController viewController, SWRevealControllerOperation operation, bool animated); | ||
|
|
||
| [Export ("revealController:didAddViewController:forOperation:animated:")] | ||
| void DidAddViewController (SWRevealViewController revealController, UIViewController viewController, SWRevealControllerOperation operation, bool animated); | ||
|
|
||
| [Export ("revealController:animationControllerForOperation:fromViewController:toViewController:")] | ||
| UIViewControllerAnimatedTransitioning AnimationControllerForOperation (SWRevealViewController revealController, SWRevealControllerOperation operation, UIViewController fromVC, UIViewController toVC); | ||
| } | ||
|
|
||
| [Category, BaseType (typeof (UIViewController))] | ||
| public partial interface SWRevealViewController_UIViewController | ||
| { | ||
| [Export ("revealViewController")] | ||
| SWRevealViewController RevealViewController (); | ||
| } | ||
|
|
||
| public delegate void SegueCallback(SWRevealViewControllerSegueSetController segue, UIViewController svc, UIViewController dvc); | ||
|
|
||
| [BaseType (typeof (UIStoryboardSegue))] | ||
| public partial interface SWRevealViewControllerSegueSetController | ||
| { | ||
| [Export ("performBlock", ArgumentSemantic.Retain)] | ||
| SegueCallback PerformDelegate { get; set; } | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net9.0-ios</TargetFramework> | ||
| <RootNamespace>SWRevealViewController</RootNamespace> | ||
| <Nullable>enable</Nullable> | ||
| <ImplicitUsings>true</ImplicitUsings> | ||
| <IsBindingProject>true</IsBindingProject> | ||
|
|
||
| <!-- Nuget package --> | ||
| <PackageId>com.jonathanantoine.SWRevealViewController</PackageId> | ||
| <Version>1.0.0.1</Version> | ||
| <Authors>Jonathan Antoine</Authors> | ||
| <Title>SWRevealViewController for dotnet</Title> | ||
| <PackageProjectUrl>https://github.com/jonathanantoine/SWRevealViewController-dotnet</PackageProjectUrl> | ||
| <Description>SWRevealViewController binding for Net 9.0 iOS</Description> | ||
| <PackageReleaseNotes>SWRevealViewController binding for Net 9.0 iOS</PackageReleaseNotes> | ||
| <PackageTags>maui ios SWRevealViewController dotnet</PackageTags> | ||
| <PackageReadmeFile>README.md</PackageReadmeFile> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ObjcBindingApiDefinition Include="ApiDefinition.cs"/> | ||
| <ObjcBindingCoreSource Include="StructsAndEnums.cs"/> | ||
| <None Include="..\.github\workflows\create-nuget.yml"/> | ||
| <None Include="..\README.md" Pack="true" PackagePath="\"/> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <NativeReference Include="SWRevealViewControllerSDK.a"> | ||
| <Kind>Static</Kind> | ||
| <Frameworks>Foundation</Frameworks> | ||
| <SmartLink>True</SmartLink> | ||
| <ForceLoad>True</ForceLoad> | ||
| <LinkerFlags>-ObjC -fobjc-arc</LinkerFlags> | ||
| </NativeReference> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| using System; | ||
| using CoreGraphics; | ||
| using Foundation; | ||
| using ObjCRuntime; | ||
| using UIKit; | ||
|
|
||
| namespace SWRevealViewControllerMaui { | ||
|
|
||
| public enum FrontViewPosition { | ||
| LeftSideMostRemoved, | ||
| LeftSideMost, | ||
| LeftSide, | ||
| Left, | ||
| Right, | ||
| RightMost, | ||
| RightMostRemoved | ||
| } | ||
|
|
||
| public enum SWRevealControllerOperation { | ||
| ReplaceRearController, | ||
| ReplaceFrontController, | ||
| ReplaceRightController | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This file currently does not define any structs or enums. If it is intended as a placeholder, consider adding a comment to clarify its purpose.