SplitView sample ported to 64-bits

This commit is contained in:
Paola Villarreal 2014-07-29 11:34:17 -05:00
Родитель 90fa4ba360
Коммит d093e3ec92
7 изменённых файлов: 34 добавлений и 31 удалений

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

@ -1,6 +1,6 @@
using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using UIKit;
using Foundation;
using Example_SplitView.Screens;
namespace Example_SplitView

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

@ -1,5 +1,5 @@
using System;
using MonoTouch.UIKit;
using UIKit;
namespace Example_SplitView
{

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

@ -2,8 +2,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Foundation;
using UIKit;
namespace Example_SplitView.Screens.DetailView
{

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

@ -11,21 +11,21 @@
namespace Example_SplitView.Screens.DetailView {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("DetailViewScreen")]
// Base type probably should be UIKit.UIViewController or subclass
[Foundation.Register("DetailViewScreen")]
public partial class DetailViewScreen {
private MonoTouch.UIKit.UIView __mt_view;
private UIKit.UIView __mt_view;
private MonoTouch.UIKit.UILabel __mt_lblItemNumber;
private UIKit.UILabel __mt_lblItemNumber;
private MonoTouch.UIKit.UIToolbar __mt_tlbrTop;
private UIKit.UIToolbar __mt_tlbrTop;
#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 {
@ -34,10 +34,10 @@ namespace Example_SplitView.Screens.DetailView {
}
}
[MonoTouch.Foundation.Connect("lblItemNumber")]
private MonoTouch.UIKit.UILabel lblItemNumber {
[Foundation.Connect("lblItemNumber")]
private UIKit.UILabel lblItemNumber {
get {
this.__mt_lblItemNumber = ((MonoTouch.UIKit.UILabel)(this.GetNativeField("lblItemNumber")));
this.__mt_lblItemNumber = ((UIKit.UILabel)(this.GetNativeField("lblItemNumber")));
return this.__mt_lblItemNumber;
}
set {
@ -46,10 +46,10 @@ namespace Example_SplitView.Screens.DetailView {
}
}
[MonoTouch.Foundation.Connect("tlbrTop")]
private MonoTouch.UIKit.UIToolbar tlbrTop {
[Foundation.Connect("tlbrTop")]
private UIKit.UIToolbar tlbrTop {
get {
this.__mt_tlbrTop = ((MonoTouch.UIKit.UIToolbar)(this.GetNativeField("tlbrTop")));
this.__mt_tlbrTop = ((UIKit.UIToolbar)(this.GetNativeField("tlbrTop")));
return this.__mt_tlbrTop;
}
set {

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

@ -1,6 +1,6 @@
using System;
using MonoTouch.UIKit;
using MonoTouch.CoreFoundation;
using UIKit;
using CoreFoundation;
namespace Example_SplitView.Screens.MainSplitView
{

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

@ -1,5 +1,5 @@
using System;
using MonoTouch.UIKit;
using UIKit;
using System.Collections.Generic;
namespace Example_SplitView.Screens.MasterView
@ -58,15 +58,15 @@ namespace Example_SplitView.Screens.MasterView
this.parentController = parentController;
}
public override int NumberOfSections (UITableView tableView)
public override nint NumberOfSections (UITableView tableView)
{ return 1; }
public override int RowsInSection (UITableView tableview, int section)
public override nint RowsInSection (UITableView tableview, nint section)
{
return Items.Count;
}
public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
public override UITableViewCell GetCell (UITableView tableView, Foundation.NSIndexPath indexPath)
{
// declare vars
UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
@ -74,15 +74,15 @@ namespace Example_SplitView.Screens.MasterView
if (cell == null)
cell = new UITableViewCell (UITableViewCellStyle.Default, cellIdentifier);
// set the item text
cell.TextLabel.Text = Items[indexPath.Row];
cell.TextLabel.Text = Items[(int)indexPath.Row];
return cell;
}
public override void RowSelected (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
public override void RowSelected (UITableView tableView, Foundation.NSIndexPath indexPath)
{
if (parentController.RowClicked != null)
parentController.RowClicked (this, new RowClickedEventArgs(Items[indexPath.Row]));
parentController.RowClicked (this, new RowClickedEventArgs(Items[(int)indexPath.Row]));
}
}
}

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

@ -16,7 +16,7 @@
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<DefineConstants>DEBUG;XAMCORE_2_0;ARCH_64</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchDebug>True</MtouchDebug>
@ -24,6 +24,7 @@
<MtouchLink>None</MtouchLink>
<MtouchI18n />
<MtouchArch>ARMv7</MtouchArch>
<MtouchExtraArgs>--registrar:static --nofastsim --override-abi x86_64</MtouchExtraArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
@ -65,7 +66,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>
@ -115,4 +118,4 @@
<ItemGroup>
<ITunesArtwork Include="Resources\iTunesArtwork.png" />
</ItemGroup>
</Project>
</Project>