Rotation sample ported to 64-bits

This commit is contained in:
Paola Villarreal 2014-07-24 15:22:53 -05:00
Родитель 4dba77f78d
Коммит ec2593777f
19 изменённых файлов: 108 добавлений и 105 удалений

Просмотреть файл

@ -1,6 +1,6 @@
using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using UIKit;
using Foundation;
namespace HandlingRotation {
[Register("AppDelegate")]

Просмотреть файл

@ -1,5 +1,5 @@
using System;
using MonoTouch.UIKit;
using UIKit;
namespace HandlingRotation {
public class Application {// : UIApplication

Просмотреть файл

@ -24,6 +24,7 @@
<MtouchI18n>
</MtouchI18n>
<MtouchArch>ARMv7</MtouchArch>
<MtouchExtraArgs>--registrar:static --nofastsim --override-abi x86_64</MtouchExtraArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
@ -64,7 +65,9 @@
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="monotouch" />
<Reference Include="Xamarin.iOS">
<HintPath>\Developer\MonoTouch\usr\lib\mono\Xamarin.iOS\Xamarin.iOS.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
@ -158,4 +161,4 @@
<ItemGroup>
<ITunesArtwork Include="Resources\iTunesArtwork.png" />
</ItemGroup>
</Project>
</Project>

Просмотреть файл

@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Foundation;
using UIKit;
namespace HandlingRotation.Screens.iPad.Home {
public partial class HomeScreenPad : UIViewController {

Просмотреть файл

@ -11,23 +11,23 @@
namespace HandlingRotation.Screens.iPad.Home {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("HomeScreenPad")]
// Base type probably should be UIKit.UIViewController or subclass
[Foundation.Register("HomeScreenPad")]
public partial class HomeScreenPad {
private MonoTouch.UIKit.UIView __mt_view;
private UIKit.UIView __mt_view;
private MonoTouch.UIKit.UIButton __mt_btnMethod1;
private UIKit.UIButton __mt_btnMethod1;
private MonoTouch.UIKit.UIButton __mt_btnMethod2;
private UIKit.UIButton __mt_btnMethod2;
private MonoTouch.UIKit.UIButton __mt_btnMethod3;
private UIKit.UIButton __mt_btnMethod3;
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("view")]
private MonoTouch.UIKit.UIView view {
[Foundation.Connect("view")]
private UIKit.UIView view {
get {
this.__mt_view = ((MonoTouch.UIKit.UIView)(this.GetNativeField("view")));
this.__mt_view = ((UIKit.UIView)(this.GetNativeField("view")));
return this.__mt_view;
}
set {
@ -36,10 +36,10 @@ namespace HandlingRotation.Screens.iPad.Home {
}
}
[MonoTouch.Foundation.Connect("btnMethod1")]
private MonoTouch.UIKit.UIButton btnMethod1 {
[Foundation.Connect("btnMethod1")]
private UIKit.UIButton btnMethod1 {
get {
this.__mt_btnMethod1 = ((MonoTouch.UIKit.UIButton)(this.GetNativeField("btnMethod1")));
this.__mt_btnMethod1 = ((UIKit.UIButton)(this.GetNativeField("btnMethod1")));
return this.__mt_btnMethod1;
}
set {
@ -48,10 +48,10 @@ namespace HandlingRotation.Screens.iPad.Home {
}
}
[MonoTouch.Foundation.Connect("btnMethod2")]
private MonoTouch.UIKit.UIButton btnMethod2 {
[Foundation.Connect("btnMethod2")]
private UIKit.UIButton btnMethod2 {
get {
this.__mt_btnMethod2 = ((MonoTouch.UIKit.UIButton)(this.GetNativeField("btnMethod2")));
this.__mt_btnMethod2 = ((UIKit.UIButton)(this.GetNativeField("btnMethod2")));
return this.__mt_btnMethod2;
}
set {
@ -60,10 +60,10 @@ namespace HandlingRotation.Screens.iPad.Home {
}
}
[MonoTouch.Foundation.Connect("btnMethod3")]
private MonoTouch.UIKit.UIButton btnMethod3 {
[Foundation.Connect("btnMethod3")]
private UIKit.UIButton btnMethod3 {
get {
this.__mt_btnMethod3 = ((MonoTouch.UIKit.UIButton)(this.GetNativeField("btnMethod3")));
this.__mt_btnMethod3 = ((UIKit.UIButton)(this.GetNativeField("btnMethod3")));
return this.__mt_btnMethod3;
}
set {

Просмотреть файл

@ -2,8 +2,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Foundation;
using UIKit;
namespace HandlingRotation.Screens.iPad.Method1Autosize {
public partial class AutosizeScreenPad : UIViewController {
@ -104,7 +104,7 @@ namespace HandlingRotation.Screens.iPad.Method1Autosize {
}
// set the cell properties
cell.TextLabel.Text = this.tableItems[indexPath.Row];
cell.TextLabel.Text = this.tableItems[(int)indexPath.Row];
// return the cell
return cell;

Просмотреть файл

@ -11,19 +11,19 @@
namespace HandlingRotation.Screens.iPad.Method1Autosize {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("AutosizeScreenPad")]
// Base type probably should be UIKit.UIViewController or subclass
[Foundation.Register("AutosizeScreenPad")]
public partial class AutosizeScreenPad {
private MonoTouch.UIKit.UIView __mt_view;
private UIKit.UIView __mt_view;
private MonoTouch.UIKit.UITableView __mt_tblMain;
private UIKit.UITableView __mt_tblMain;
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("view")]
private MonoTouch.UIKit.UIView view {
[Foundation.Connect("view")]
private UIKit.UIView view {
get {
this.__mt_view = ((MonoTouch.UIKit.UIView)(this.GetNativeField("view")));
this.__mt_view = ((UIKit.UIView)(this.GetNativeField("view")));
return this.__mt_view;
}
set {
@ -32,10 +32,10 @@ namespace HandlingRotation.Screens.iPad.Method1Autosize {
}
}
[MonoTouch.Foundation.Connect("tblMain")]
private MonoTouch.UIKit.UITableView tblMain {
[Foundation.Connect("tblMain")]
private UIKit.UITableView tblMain {
get {
this.__mt_tblMain = ((MonoTouch.UIKit.UITableView)(this.GetNativeField("tblMain")));
this.__mt_tblMain = ((UIKit.UITableView)(this.GetNativeField("tblMain")));
return this.__mt_tblMain;
}
set {

Просмотреть файл

@ -1,5 +1,5 @@
using System;
using MonoTouch.UIKit;
using UIKit;
namespace HandlingRotation.Screens.iPad.Method2MoveControls {
public class Controller : UIViewController {
@ -83,11 +83,11 @@ namespace HandlingRotation.Screens.iPad.Method2MoveControls {
case UIInterfaceOrientation.LandscapeRight:
// reposition the buttons
button1.Frame = new System.Drawing.RectangleF (10, 10, 100, 33);
button2.Frame = new System.Drawing.RectangleF (10, 200, 100, 33);
button1.Frame = new CoreGraphics.CGRect (10, 10, 100, 33);
button2.Frame = new CoreGraphics.CGRect (10, 200, 100, 33);
// reposition the image
image.Frame = new System.Drawing.RectangleF (240, 25, this.image.Frame.Width, this.image.Frame.Height);
image.Frame = new CoreGraphics.CGRect (240, 25, this.image.Frame.Width, this.image.Frame.Height);
break;
@ -96,11 +96,11 @@ namespace HandlingRotation.Screens.iPad.Method2MoveControls {
case UIInterfaceOrientation.PortraitUpsideDown:
// reposition the buttons
button1.Frame = new System.Drawing.RectangleF (10, 10, 100, 33);
button2.Frame = new System.Drawing.RectangleF (200, 10, 100, 33);
button1.Frame = new CoreGraphics.CGRect (10, 10, 100, 33);
button2.Frame = new CoreGraphics.CGRect (200, 10, 100, 33);
// reposition the image
image.Frame = new System.Drawing.RectangleF (20, 150, this.image.Frame.Width, this.image.Frame.Height);
image.Frame = new CoreGraphics.CGRect (20, 150, this.image.Frame.Width, this.image.Frame.Height);
break;
}

Просмотреть файл

@ -1,6 +1,6 @@
using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using UIKit;
using Foundation;
namespace HandlingRotation.Screens.iPad.Method3SwapViews
{

Просмотреть файл

@ -2,8 +2,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Foundation;
using UIKit;
namespace HandlingRotation.Screens.iPhone.Home
{

Просмотреть файл

@ -11,23 +11,23 @@
namespace HandlingRotation.Screens.iPhone.Home {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("HomeScreen")]
// Base type probably should be UIKit.UIViewController or subclass
[Foundation.Register("HomeScreen")]
public partial class HomeScreen {
private MonoTouch.UIKit.UIView __mt_view;
private UIKit.UIView __mt_view;
private MonoTouch.UIKit.UIButton __mt_btnMethod1;
private UIKit.UIButton __mt_btnMethod1;
private MonoTouch.UIKit.UIButton __mt_btnMethod2;
private UIKit.UIButton __mt_btnMethod2;
private MonoTouch.UIKit.UIButton __mt_btnMethod3;
private UIKit.UIButton __mt_btnMethod3;
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("view")]
private MonoTouch.UIKit.UIView view {
[Foundation.Connect("view")]
private UIKit.UIView view {
get {
this.__mt_view = ((MonoTouch.UIKit.UIView)(this.GetNativeField("view")));
this.__mt_view = ((UIKit.UIView)(this.GetNativeField("view")));
return this.__mt_view;
}
set {
@ -36,10 +36,10 @@ namespace HandlingRotation.Screens.iPhone.Home {
}
}
[MonoTouch.Foundation.Connect("btnMethod1")]
private MonoTouch.UIKit.UIButton btnMethod1 {
[Foundation.Connect("btnMethod1")]
private UIKit.UIButton btnMethod1 {
get {
this.__mt_btnMethod1 = ((MonoTouch.UIKit.UIButton)(this.GetNativeField("btnMethod1")));
this.__mt_btnMethod1 = ((UIKit.UIButton)(this.GetNativeField("btnMethod1")));
return this.__mt_btnMethod1;
}
set {
@ -48,10 +48,10 @@ namespace HandlingRotation.Screens.iPhone.Home {
}
}
[MonoTouch.Foundation.Connect("btnMethod2")]
private MonoTouch.UIKit.UIButton btnMethod2 {
[Foundation.Connect("btnMethod2")]
private UIKit.UIButton btnMethod2 {
get {
this.__mt_btnMethod2 = ((MonoTouch.UIKit.UIButton)(this.GetNativeField("btnMethod2")));
this.__mt_btnMethod2 = ((UIKit.UIButton)(this.GetNativeField("btnMethod2")));
return this.__mt_btnMethod2;
}
set {
@ -60,10 +60,10 @@ namespace HandlingRotation.Screens.iPhone.Home {
}
}
[MonoTouch.Foundation.Connect("btnMethod3")]
private MonoTouch.UIKit.UIButton btnMethod3 {
[Foundation.Connect("btnMethod3")]
private UIKit.UIButton btnMethod3 {
get {
this.__mt_btnMethod3 = ((MonoTouch.UIKit.UIButton)(this.GetNativeField("btnMethod3")));
this.__mt_btnMethod3 = ((UIKit.UIButton)(this.GetNativeField("btnMethod3")));
return this.__mt_btnMethod3;
}
set {

Просмотреть файл

@ -2,8 +2,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Foundation;
using UIKit;
namespace HandlingRotation.Screens.iPhone.Method1Autosize {
public partial class AutosizeScreen : UIViewController {
@ -103,7 +103,7 @@ namespace HandlingRotation.Screens.iPhone.Method1Autosize {
}
// set the cell properties
cell.TextLabel.Text = this.tableItems[indexPath.Row];
cell.TextLabel.Text = this.tableItems[(int)indexPath.Row];
// return the cell
return cell;

Просмотреть файл

@ -11,19 +11,19 @@
namespace HandlingRotation.Screens.iPhone.Method1Autosize {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("AutosizeScreen")]
// Base type probably should be UIKit.UIViewController or subclass
[Foundation.Register("AutosizeScreen")]
public partial class AutosizeScreen {
private MonoTouch.UIKit.UIView __mt_view;
private UIKit.UIView __mt_view;
private MonoTouch.UIKit.UITableView __mt_tblMain;
private UIKit.UITableView __mt_tblMain;
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("view")]
private MonoTouch.UIKit.UIView view {
[Foundation.Connect("view")]
private UIKit.UIView view {
get {
this.__mt_view = ((MonoTouch.UIKit.UIView)(this.GetNativeField("view")));
this.__mt_view = ((UIKit.UIView)(this.GetNativeField("view")));
return this.__mt_view;
}
set {
@ -32,10 +32,10 @@ namespace HandlingRotation.Screens.iPhone.Method1Autosize {
}
}
[MonoTouch.Foundation.Connect("tblMain")]
private MonoTouch.UIKit.UITableView tblMain {
[Foundation.Connect("tblMain")]
private UIKit.UITableView tblMain {
get {
this.__mt_tblMain = ((MonoTouch.UIKit.UITableView)(this.GetNativeField("tblMain")));
this.__mt_tblMain = ((UIKit.UITableView)(this.GetNativeField("tblMain")));
return this.__mt_tblMain;
}
set {

Просмотреть файл

@ -1,5 +1,5 @@
using System;
using MonoTouch.UIKit;
using UIKit;
namespace HandlingRotation.Screens.iPhone.Method2MoveControls {
public class Controller : UIViewController
@ -82,11 +82,11 @@ namespace HandlingRotation.Screens.iPhone.Method2MoveControls {
case UIInterfaceOrientation.LandscapeRight:
// reposition the buttons
button1.Frame = new System.Drawing.RectangleF (10, 10, 100, 33);
button2.Frame = new System.Drawing.RectangleF (10, 200, 100, 33);
button1.Frame = new CoreGraphics.CGRect (10, 10, 100, 33);
button2.Frame = new CoreGraphics.CGRect (10, 200, 100, 33);
// reposition the image
image.Frame = new System.Drawing.RectangleF (240, 25, image.Frame.Width, image.Frame.Height);
image.Frame = new CoreGraphics.CGRect (240, 25, image.Frame.Width, image.Frame.Height);
break;
@ -95,11 +95,11 @@ namespace HandlingRotation.Screens.iPhone.Method2MoveControls {
case UIInterfaceOrientation.PortraitUpsideDown:
// reposition the buttons
button1.Frame = new System.Drawing.RectangleF (10, 10, 100, 33);
button2.Frame = new System.Drawing.RectangleF (200, 10, 100, 33);
button1.Frame = new CoreGraphics.CGRect (10, 10, 100, 33);
button2.Frame = new CoreGraphics.CGRect (200, 10, 100, 33);
// reposition the image
image.Frame = new System.Drawing.RectangleF (20, 150, this.image.Frame.Width, this.image.Frame.Height);
image.Frame = new CoreGraphics.CGRect (20, 150, this.image.Frame.Width, this.image.Frame.Height);
break;
}

Просмотреть файл

@ -1,6 +1,6 @@
using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using UIKit;
using Foundation;
namespace HandlingRotation.Screens.iPhone.Method3SwapViews {
public class Controller : UIViewController {

Просмотреть файл

@ -2,8 +2,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Foundation;
using UIKit;
namespace HandlingRotation.Screens.iPhone.Method3SwapViews
{

Просмотреть файл

@ -11,17 +11,17 @@
namespace HandlingRotation.Screens.iPhone.Method3SwapViews {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("LandscapeView")]
// Base type probably should be UIKit.UIViewController or subclass
[Foundation.Register("LandscapeView")]
public partial class LandscapeView {
private MonoTouch.UIKit.UIView __mt_view;
private UIKit.UIView __mt_view;
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("view")]
private MonoTouch.UIKit.UIView view {
[Foundation.Connect("view")]
private UIKit.UIView view {
get {
this.__mt_view = ((MonoTouch.UIKit.UIView)(this.GetNativeField("view")));
this.__mt_view = ((UIKit.UIView)(this.GetNativeField("view")));
return this.__mt_view;
}
set {

Просмотреть файл

@ -2,8 +2,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Foundation;
using UIKit;
namespace HandlingRotation.Screens.iPhone.Method3SwapViews
{

Просмотреть файл

@ -11,17 +11,17 @@
namespace HandlingRotation.Screens.iPhone.Method3SwapViews {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("PortraitView")]
// Base type probably should be UIKit.UIViewController or subclass
[Foundation.Register("PortraitView")]
public partial class PortraitView {
private MonoTouch.UIKit.UIView __mt_view;
private UIKit.UIView __mt_view;
#pragma warning disable 0169
[MonoTouch.Foundation.Connect("view")]
private MonoTouch.UIKit.UIView view {
[Foundation.Connect("view")]
private UIKit.UIView view {
get {
this.__mt_view = ((MonoTouch.UIKit.UIView)(this.GetNativeField("view")));
this.__mt_view = ((UIKit.UIView)(this.GetNativeField("view")));
return this.__mt_view;
}
set {