-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yvan Rodrigues
committed
Jan 8, 2015
1 parent
f9b7d9e
commit 080b9d5
Showing
13 changed files
with
879 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,47 @@ | ||
using Foundation; | ||
using UIKit; | ||
|
||
namespace RedCell.UI.iOS.DragDrop.Demo | ||
{ | ||
// The UIApplicationDelegate for the application. This class is responsible for launching the | ||
// User Interface of the application, as well as listening (and optionally responding) to | ||
// application events from iOS. | ||
[Register("AppDelegate")] | ||
public partial class AppDelegate : UIApplicationDelegate | ||
{ | ||
public override bool FinishedLaunching(UIApplication app, NSDictionary options) | ||
{ | ||
Window = new UIWindow(UIScreen.MainScreen.Bounds); | ||
Window.RootViewController = new RootViewController(); | ||
Window.MakeKeyAndVisible(); | ||
|
||
return true; | ||
} | ||
|
||
// class-level declarations | ||
public override UIWindow Window | ||
{ | ||
get; | ||
set; | ||
} | ||
// This method is invoked when the application is about to move from active to inactive state. | ||
// OpenGL applications should use this method to pause. | ||
public override void OnResignActivation(UIApplication application) | ||
{ | ||
} | ||
// This method should be used to release shared resources and it should store the application state. | ||
// If your application supports background exection this method is called instead of WillTerminate | ||
// when the user quits. | ||
public override void DidEnterBackground(UIApplication application) | ||
{ | ||
} | ||
// This method is called as part of the transiton from background to active state. | ||
public override void WillEnterForeground(UIApplication application) | ||
{ | ||
} | ||
// This method is called when the application is about to terminate. Save data, if needed. | ||
public override void WillTerminate(UIApplication application) | ||
{ | ||
} | ||
} | ||
} |
This file contains 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,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDisplayName</key> | ||
<string>RedCell.UI.iOS.DragDrop.Demo</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.RedCell.UI.iOS.DragDrop.Demo</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>LSRequiresIPhoneOS</key> | ||
<true/> | ||
<key>MinimumOSVersion</key> | ||
<string>6.0</string> | ||
<key>UIDeviceFamily</key> | ||
<array> | ||
<integer>1</integer> | ||
<integer>2</integer> | ||
</array> | ||
<key>UIRequiredDeviceCapabilities</key> | ||
<array> | ||
<string>armv7</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations~ipad</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>CFBundleIconFiles</key> | ||
<array> | ||
<string>[email protected]</string> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains 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,13 @@ | ||
using UIKit; | ||
|
||
namespace RedCell.UI.iOS.DragDrop.Demo | ||
{ | ||
public class Application | ||
{ | ||
// This is the main entry point of the application. | ||
static void Main(string[] args) | ||
{ | ||
UIApplication.Main(args, null, "AppDelegate"); | ||
} | ||
} | ||
} |
This file contains 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,35 @@ | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("RedCell.UI.iOS.DragDrop.Demo")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("RedCell.UI.iOS.DragDrop.Demo")] | ||
[assembly: AssemblyCopyright("Copyright © 2015")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("78312c1c-9393-4a32-98d7-6a7844197239")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
129 changes: 129 additions & 0 deletions
129
RedCell.UI.iOS.DragDrop.Demo/RedCell.UI.iOS.DragDrop.Demo.csproj
This file contains 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,129 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform> | ||
<ProjectGuid>{ADDCDCD6-02D4-48EA-B8FD-C06CA9BAC7AE}</ProjectGuid> | ||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>RedCell.UI.iOS.DragDrop.Demo</RootNamespace> | ||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> | ||
<AssemblyName>RedCellUIiOSDragDropDemo</AssemblyName> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath> | ||
<DefineConstants>DEBUG</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
<MtouchArch>i386, x86_64</MtouchArch> | ||
<MtouchLink>None</MtouchLink> | ||
<MtouchDebug>true</MtouchDebug> | ||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> | ||
<DebugType>none</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<MtouchLink>None</MtouchLink> | ||
<MtouchArch>i386, x86_64</MtouchArch> | ||
<ConsolePause>false</ConsolePause> | ||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\iPhone\Debug</OutputPath> | ||
<DefineConstants>DEBUG</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>false</ConsolePause> | ||
<MtouchArch>Default, ARMv7</MtouchArch> | ||
<CodesignEntitlements> | ||
</CodesignEntitlements> | ||
<CodesignKey>iPhone Developer</CodesignKey> | ||
<MtouchDebug>True</MtouchDebug> | ||
<MtouchSdkVersion>8.1</MtouchSdkVersion> | ||
<MtouchLink>SdkOnly</MtouchLink> | ||
<MtouchProfiling>False</MtouchProfiling> | ||
<MtouchExtraArgs /> | ||
<MtouchFastDev>False</MtouchFastDev> | ||
<MtouchEnableGenericValueTypeSharing>True</MtouchEnableGenericValueTypeSharing> | ||
<MtouchUseLlvm>False</MtouchUseLlvm> | ||
<MtouchUseThumb>False</MtouchUseThumb> | ||
<MtouchUseSGen>False</MtouchUseSGen> | ||
<MtouchUseRefCounting>False</MtouchUseRefCounting> | ||
<MtouchOptimizePNGs>True</MtouchOptimizePNGs> | ||
<MtouchI18n /> | ||
<CodesignProvision /> | ||
<CodesignResourceRules /> | ||
<CodesignExtraArgs /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> | ||
<DebugType>none</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\iPhone\Release</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements> | ||
<MtouchArch>ARMv7, ARM64</MtouchArch> | ||
<ConsolePause>false</ConsolePause> | ||
<CodesignKey>iPhone Developer</CodesignKey> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' "> | ||
<DebugType>none</DebugType> | ||
<Optimize>True</Optimize> | ||
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>False</ConsolePause> | ||
<MtouchArch>ARMv7, ARM64</MtouchArch> | ||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements> | ||
<BuildIpa>True</BuildIpa> | ||
<CodesignProvision>Automatic:AdHoc</CodesignProvision> | ||
<CodesignKey>iPhone Distribution</CodesignKey> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' "> | ||
<DebugType>none</DebugType> | ||
<Optimize>True</Optimize> | ||
<OutputPath>bin\iPhone\AppStore</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<ConsolePause>False</ConsolePause> | ||
<MtouchArch>ARMv7, ARM64</MtouchArch> | ||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements> | ||
<CodesignProvision>Automatic:AppStore</CodesignProvision> | ||
<CodesignKey>iPhone Distribution</CodesignKey> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="Main.cs" /> | ||
<Compile Include="AppDelegate.cs" /> | ||
<None Include="Info.plist"> | ||
<SubType>Designer</SubType> | ||
</None> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="RootViewController.cs" /> | ||
<BundleResource Include="Resources\Default-568h%402x.png" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="Xamarin.iOS" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\RedCell.UI.iOS.DragDrop\RedCell.UI.iOS.DragDrop.csproj"> | ||
<Project>{87196a4b-8a6e-41eb-be13-78a2e26ad9f9}</Project> | ||
<Name>RedCell.UI.iOS.DragDrop</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> | ||
</Project> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,47 @@ | ||
using CoreGraphics; | ||
using Foundation; | ||
using UIKit; | ||
|
||
namespace RedCell.UI.iOS.DragDrop.Demo | ||
{ | ||
public class RootViewController : UIViewController | ||
{ | ||
public override void ViewDidLoad() | ||
{ | ||
base.ViewDidLoad(); | ||
|
||
// Main background | ||
View.BackgroundColor = UIColor.White; | ||
|
||
// Configure drag/drop globally. | ||
// These is exaggerated for demonstration. | ||
DragDropGestureRecognizer.HoldToBeginThresholdMilliseconds = 2000; | ||
DragDropGestureRecognizer.MovementThreshold = 50; | ||
|
||
// Make some boxes. | ||
var red = new UIView | ||
{ | ||
Frame = new CGRect(100, 100, 100, 100), | ||
BackgroundColor = UIColor.Red | ||
}; | ||
red.AddGestureRecognizer(new DragDropGestureRecognizer()); | ||
View.AddSubview(red); | ||
|
||
var green = new UIView | ||
{ | ||
Frame = new CGRect(100, 250, 100, 100), | ||
BackgroundColor = UIColor.Green | ||
}; | ||
green.AddGestureRecognizer(new DragDropGestureRecognizer()); | ||
View.AddSubview(green); | ||
|
||
var blue = new UIView | ||
{ | ||
Frame = new CGRect(100, 400, 100, 100), | ||
BackgroundColor = UIColor.Blue | ||
}; | ||
blue.AddGestureRecognizer(new DragDropGestureRecognizer()); | ||
View.AddSubview(blue); | ||
} | ||
} | ||
} |
Oops, something went wrong.