зеркало из https://github.com/xamarin/ios-samples.git
SimpleDrillDown sample ported to 64-bits
This commit is contained in:
Родитель
5f99e65ef1
Коммит
608a077b3c
|
@ -27,8 +27,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MonoTouch.Foundation;
|
||||
using MonoTouch.UIKit;
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace SimpleDrillDown {
|
||||
/// <summary>
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections.Generic;
|
||||
using MonoTouch.Foundation;
|
||||
using MonoTouch.UIKit;
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace SimpleDrillDown {
|
||||
|
||||
|
@ -61,13 +61,13 @@ namespace SimpleDrillDown {
|
|||
}
|
||||
|
||||
// Customize the number of sections in the table view.
|
||||
public override int NumberOfSections (UITableView tableView)
|
||||
public override nint NumberOfSections (UITableView tableView)
|
||||
{
|
||||
// One section for the Date, Genre and then Characters.
|
||||
return 3;
|
||||
}
|
||||
|
||||
public override string TitleForHeader (UITableView tableView, int section)
|
||||
public override string TitleForHeader (UITableView tableView, nint section)
|
||||
{
|
||||
if (section == 0) {
|
||||
return "Date";
|
||||
|
@ -78,7 +78,7 @@ namespace SimpleDrillDown {
|
|||
}
|
||||
}
|
||||
|
||||
public override int RowsInSection (UITableView tableview, int section)
|
||||
public override nint RowsInSection (UITableView tableview, nint section)
|
||||
{
|
||||
// Date and Genre sections have one entry
|
||||
if (section == 0 || section == 1)
|
||||
|
@ -88,7 +88,7 @@ namespace SimpleDrillDown {
|
|||
}
|
||||
|
||||
// Customize the appearance of table view cells.
|
||||
public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
|
||||
public override UITableViewCell GetCell (UITableView tableView, Foundation.NSIndexPath indexPath)
|
||||
{
|
||||
string cellIdentifier = "Cell";
|
||||
var cell = tableView.DequeueReusableCell (cellIdentifier);
|
||||
|
@ -102,7 +102,7 @@ namespace SimpleDrillDown {
|
|||
} else if (indexPath.Section == 1) {
|
||||
cell.TextLabel.Text = controller.Play.Genre;
|
||||
} else {
|
||||
cell.TextLabel.Text = controller.Play.Characters [indexPath.Row];
|
||||
cell.TextLabel.Text = controller.Play.Characters [(int)indexPath.Row];
|
||||
}
|
||||
|
||||
return cell;
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MonoTouch.Foundation;
|
||||
using MonoTouch.UIKit;
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace SimpleDrillDown {
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using MonoTouch.UIKit;
|
||||
using MonoTouch.Foundation;
|
||||
using UIKit;
|
||||
using Foundation;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SimpleDrillDown {
|
||||
|
@ -67,18 +67,18 @@ namespace SimpleDrillDown {
|
|||
}
|
||||
|
||||
// Customize the number of sections in the table view.
|
||||
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 Plays.Count;
|
||||
}
|
||||
|
||||
// Customize the appearance of table view cells.
|
||||
public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
|
||||
public override UITableViewCell GetCell (UITableView tableView, Foundation.NSIndexPath indexPath)
|
||||
{
|
||||
string cellIdentifier = "Cell";
|
||||
var cell = tableView.DequeueReusableCell (cellIdentifier);
|
||||
|
@ -88,14 +88,14 @@ namespace SimpleDrillDown {
|
|||
}
|
||||
|
||||
// Set the title of the play as the text.
|
||||
cell.TextLabel.Text = Plays [indexPath.Row].Title;
|
||||
cell.TextLabel.Text = Plays [(int)indexPath.Row].Title;
|
||||
return cell;
|
||||
}
|
||||
|
||||
public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
|
||||
{
|
||||
// Update the PlayView with the information from the selected play
|
||||
PlayView.Play = Plays [indexPath.Row];
|
||||
PlayView.Play = Plays [(int)indexPath.Row];
|
||||
|
||||
// Make the PlayView the active View.
|
||||
controller.NavigationController.PushViewController (PlayView, true);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// actions made in the Xcode designer. If it is removed, they will be lost.
|
||||
// Manual changes to this file may not be handled correctly.
|
||||
//
|
||||
using MonoTouch.Foundation;
|
||||
using Foundation;
|
||||
|
||||
namespace SimpleDrillDown {
|
||||
|
||||
|
|
|
@ -16,12 +16,13 @@
|
|||
<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>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchDebug>True</MtouchDebug>
|
||||
<MtouchExtraArgs>--registrar:static --nofastsim --override-abi x86_64</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>none</DebugType>
|
||||
|
@ -57,7 +58,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>
|
||||
<ItemGroup>
|
||||
<None Include="Info.plist" />
|
||||
|
@ -100,4 +103,4 @@
|
|||
<ItemGroup>
|
||||
<ITunesArtwork Include="Resources\iTunesArtwork.png" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
Загрузка…
Ссылка в новой задаче