Skip to content
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

Xamarin #158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.DS_Store
JASidePanelsBinding/JASidePanelsBinding/obj
JASidePanelsBinding/JASidePanelsBinding/bin
build
*.a
99 changes: 99 additions & 0 deletions JASidePanels.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
objects = {

/* Begin PBXBuildFile section */
53DE400F17D00B03005B73F2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9561ACB3151286EE005889C6 /* Foundation.framework */; };
53DE401A17D00B4E005B73F2 /* JASidePanelController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9561AD0E15130EE2005889C6 /* JASidePanelController.m */; };
53DE401B17D00B4E005B73F2 /* UIViewController+JASidePanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 95BCC45915F081130009F1DA /* UIViewController+JASidePanel.m */; };
53DE401C17D00B61005B73F2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95322A701517AEEB0069C8D7 /* QuartzCore.framework */; };
53DE401D17D00B63005B73F2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9561ACB1151286EE005889C6 /* UIKit.framework */; };
53DE401E17D00B65005B73F2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9561ACB5151286EE005889C6 /* CoreGraphics.framework */; };
5C49572716C555F700250332 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5C49572616C555F700250332 /* Default-568h@2x.png */; };
95322A731517AEF40069C8D7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95322A701517AEEB0069C8D7 /* QuartzCore.framework */; };
9561ACB2151286EE005889C6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9561ACB1151286EE005889C6 /* UIKit.framework */; };
Expand All @@ -23,7 +29,20 @@
95BCC45A15F081130009F1DA /* UIViewController+JASidePanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 95BCC45915F081130009F1DA /* UIViewController+JASidePanel.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
53DE400C17D00B03005B73F2 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "include/${PRODUCT_NAME}";
dstSubfolderSpec = 16;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
53DE400E17D00B03005B73F2 /* libJASidePanelsStatic.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJASidePanelsStatic.a; sourceTree = BUILT_PRODUCTS_DIR; };
5C49572616C555F700250332 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
95322A701517AEEB0069C8D7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
9561ACAD151286EE005889C6 /* JASidePanels.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JASidePanels.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -51,6 +70,17 @@
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
53DE400B17D00B03005B73F2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
53DE400F17D00B03005B73F2 /* Foundation.framework in Frameworks */,
53DE401C17D00B61005B73F2 /* QuartzCore.framework in Frameworks */,
53DE401D17D00B63005B73F2 /* UIKit.framework in Frameworks */,
53DE401E17D00B65005B73F2 /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
9561ACAA151286EE005889C6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -79,6 +109,7 @@
isa = PBXGroup;
children = (
9561ACAD151286EE005889C6 /* JASidePanels.app */,
53DE400E17D00B03005B73F2 /* libJASidePanelsStatic.a */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -146,6 +177,23 @@
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
53DE400D17D00B03005B73F2 /* JASidePanelsStatic */ = {
isa = PBXNativeTarget;
buildConfigurationList = 53DE401717D00B03005B73F2 /* Build configuration list for PBXNativeTarget "JASidePanelsStatic" */;
buildPhases = (
53DE400A17D00B03005B73F2 /* Sources */,
53DE400B17D00B03005B73F2 /* Frameworks */,
53DE400C17D00B03005B73F2 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = JASidePanelsStatic;
productName = JASidePanelsStatic;
productReference = 53DE400E17D00B03005B73F2 /* libJASidePanelsStatic.a */;
productType = "com.apple.product-type.library.static";
};
9561ACAC151286EE005889C6 /* JASidePanels */ = {
isa = PBXNativeTarget;
buildConfigurationList = 9561ACCE151286EE005889C6 /* Build configuration list for PBXNativeTarget "JASidePanels" */;
Expand Down Expand Up @@ -185,6 +233,7 @@
projectRoot = "";
targets = (
9561ACAC151286EE005889C6 /* JASidePanels */,
53DE400D17D00B03005B73F2 /* JASidePanelsStatic */,
);
};
/* End PBXProject section */
Expand All @@ -202,6 +251,15 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
53DE400A17D00B03005B73F2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
53DE401A17D00B4E005B73F2 /* JASidePanelController.m in Sources */,
53DE401B17D00B4E005B73F2 /* UIViewController+JASidePanel.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
9561ACA9151286EE005889C6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -231,6 +289,39 @@
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
53DE401817D00B03005B73F2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_EMPTY_BODY = YES;
DSTROOT = /tmp/JASidePanelsStatic.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "JASidePanels/Demo/JASidePanels-Prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
53DE401917D00B03005B73F2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_EMPTY_BODY = YES;
DSTROOT = /tmp/JASidePanelsStatic.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "JASidePanels/Demo/JASidePanels-Prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
9561ACCC151286EE005889C6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -313,6 +404,14 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
53DE401717D00B03005B73F2 /* Build configuration list for PBXNativeTarget "JASidePanelsStatic" */ = {
isa = XCConfigurationList;
buildConfigurations = (
53DE401817D00B03005B73F2 /* Debug */,
53DE401917D00B03005B73F2 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
9561ACA7151286EE005889C6 /* Build configuration list for PBXProject "JASidePanels" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
1 change: 1 addition & 0 deletions JASidePanels/Source/JASidePanelController.m
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ - (void)_undoPan {

- (void)setTapView:(UIView *)tapView {
if (tapView != _tapView) {
_tapView.gestureRecognizers = nil;
[_tapView removeFromSuperview];
_tapView = tapView;
if (_tapView) {
Expand Down
20 changes: 20 additions & 0 deletions JASidePanelsBinding/JASidePanelsBinding.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JASidePanels", "JASidePanelsBinding\JASidePanels.csproj", "{60ED399A-D3EF-4B28-9C1B-28EBA601C3B1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{60ED399A-D3EF-4B28-9C1B-28EBA601C3B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60ED399A-D3EF-4B28-9C1B-28EBA601C3B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60ED399A-D3EF-4B28-9C1B-28EBA601C3B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60ED399A-D3EF-4B28-9C1B-28EBA601C3B1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = JASidePanelsBinding\JASidePanels.csproj
EndGlobalSection
EndGlobal
33 changes: 33 additions & 0 deletions JASidePanelsBinding/JASidePanelsBinding.userprefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="JASidePanelsBinding/ApiDefinition.cs">
<Files>
<File FileName="JASidePanelsBinding/ApiDefinition.cs" Line="161" Column="35" />
<File FileName="JASidePanelsBinding/StructsAndEnums.cs" Line="1" Column="1" />
<File FileName="JASidePanelsBinding/libJASidePanelsStatic.linkwith.cs" Line="1" Column="1" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State expanded="True">
<Node name="JASidePanels" expanded="True">
<Node name="References" expanded="True" />
<Node name="ApiDefinition.cs" selected="True" />
</Node>
</State>
</Pad>
<Pad Id="ClassPad">
<State expanded="True" selected="True" />
</Pad>
<Pad Id="MonoDevelop.Debugger.WatchPad">
<State />
</Pad>
<Pad Id="ConnectionManagerPad">
<State selected="True" />
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>
164 changes: 164 additions & 0 deletions JASidePanelsBinding/JASidePanelsBinding/ApiDefinition.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
using System;
using System.Drawing;
using MonoTouch.ObjCRuntime;
using MonoTouch.Foundation;
using MonoTouch.UIKit;

namespace JASidePanels
{
[BaseType (typeof (UIViewController))]
public partial interface JASidePanelController
{
[Export ("leftPanel", ArgumentSemantic.Retain)]
UIViewController LeftPanel { get; set; }

[Export ("centerPanel", ArgumentSemantic.Retain)]
UIViewController CenterPanel { get; set; }

[Export ("rightPanel", ArgumentSemantic.Retain)]
UIViewController RightPanel { get; set; }

[Export ("showLeftPanel:")]
void ShowLeftPanel (bool animated);

[Export ("showRightPanel:")]
void ShowRightPanel (bool animated);

[Export ("showCenterPanel:")]
void ShowCenterPanel (bool animated);

[Export ("showLeftPanelAnimated:")]
void ShowLeftPanelAnimated (bool animated);

[Export ("showRightPanelAnimated:")]
void ShowRightPanelAnimated (bool animated);

[Export ("showCenterPanelAnimated:")]
void ShowCenterPanelAnimated (bool animated);

[Export ("toggleLeftPanel:")]
void ToggleLeftPanel (NSObject sender);

[Export ("toggleRightPanel:")]
void ToggleRightPanel (NSObject sender);

[Export ("setCenterPanelHidden:animated:duration:")]
void SetCenterPanelHidden (bool centerPanelHidden, bool animated, double duration);

[Export ("style")]
JASidePanelStyle Style { get; set; }

[Export ("pushesSidePanels")]
bool PushesSidePanels { get; set; }

[Export ("leftGapPercentage")]
float LeftGapPercentage { get; set; }

[Export ("leftFixedWidth")]
float LeftFixedWidth { get; set; }

[Export ("leftVisibleWidth")]
float LeftVisibleWidth { get; }

[Export ("rightGapPercentage")]
float RightGapPercentage { get; set; }

[Export ("rightFixedWidth")]
float RightFixedWidth { get; set; }

[Export ("rightVisibleWidth")]
float RightVisibleWidth { get; }

[Export ("styleContainer:animate:duration:")]
void StyleContainer (UIView container, bool animate, double duration);

[Export ("stylePanel:")]
void StylePanel (UIView panel);

[Export ("minimumMovePercentage")]
float MinimumMovePercentage { get; set; }

[Export ("maximumAnimationDuration")]
float MaximumAnimationDuration { get; set; }

[Export ("bounceDuration")]
float BounceDuration { get; set; }

[Export ("bouncePercentage")]
float BouncePercentage { get; set; }

[Export ("bounceOnSidePanelOpen")]
bool BounceOnSidePanelOpen { get; set; }

[Export ("bounceOnSidePanelClose")]
bool BounceOnSidePanelClose { get; set; }

[Export ("bounceOnCenterPanelChange")]
bool BounceOnCenterPanelChange { get; set; }

[Export ("panningLimitedToTopViewController")]
bool PanningLimitedToTopViewController { get; set; }

[Export ("recognizesPanGesture")]
bool RecognizesPanGesture { get; set; }

[Static, Export ("defaultImage")]
UIImage DefaultImage { get; }

[Export ("leftButtonForCenterPanel")]
UIBarButtonItem LeftButtonForCenterPanel { get; }

[Export ("state")]
JASidePanelState State { get; }

[Export ("centerPanelHidden")]
bool CenterPanelHidden { get; set; }

[Export ("visiblePanel", ArgumentSemantic.Assign)]
UIViewController VisiblePanel { get; }

[Export ("shouldDelegateAutorotateToVisiblePanel")]
bool ShouldDelegateAutorotateToVisiblePanel { get; set; }

[Export ("canUnloadRightPanel")]
bool CanUnloadRightPanel { get; set; }

[Export ("canUnloadLeftPanel")]
bool CanUnloadLeftPanel { get; set; }

[Export ("shouldResizeRightPanel")]
bool ShouldResizeRightPanel { get; set; }

[Export ("shouldResizeLeftPanel")]
bool ShouldResizeLeftPanel { get; set; }

[Export ("allowRightOverpan")]
bool AllowRightOverpan { get; set; }

[Export ("allowLeftOverpan")]
bool AllowLeftOverpan { get; set; }

[Export ("allowLeftSwipe")]
bool AllowLeftSwipe { get; set; }

[Export ("allowRightSwipe")]
bool AllowRightSwipe { get; set; }

[Export ("leftPanelContainer", ArgumentSemantic.Retain)]
UIView LeftPanelContainer { get; }

[Export ("rightPanelContainer", ArgumentSemantic.Retain)]
UIView RightPanelContainer { get; }

[Export ("centerPanelContainer", ArgumentSemantic.Retain)]
UIView CenterPanelContainer { get; }
}

[BaseType (typeof (UIViewController))]
[Category]
interface UIViewControllerExtension
{
[Export ("sidePanelController")]
JASidePanelController SidePanelController ();
}
}