LazyTableImages sample ported to 64-bits

This commit is contained in:
Paola Villarreal 2014-06-04 14:50:32 -05:00
Родитель e79bf7191e
Коммит dd317ecc26
6 изменённых файлов: 21 добавлений и 16 удалений

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

@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
using MonoTouch.UIKit;
using UIKit;
namespace LazyTableImages {

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

@ -27,8 +27,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Foundation;
using UIKit;
using System.Net;
using System.Collections.ObjectModel;

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

@ -16,13 +16,14 @@
<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>
<MtouchI18n />
<MtouchExtraArgs>--registrar:static --nofastsim --override-abi x86_64</MtouchExtraArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
@ -58,8 +59,12 @@
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="monotouch" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Xamarin.iOS">
<HintPath>\Developer\MonoTouch\usr\lib\mono\Xamarin.iOS\Xamarin.iOS.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq">
<HintPath>\Developer\MonoTouch\usr\lib\mono\Xamarin.iOS\System.Xml.Linq.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
@ -107,4 +112,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 LazyTableImages {

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

@ -27,8 +27,8 @@
using System;
using System.Drawing;
using System.Linq;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using UIKit;
using Foundation;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using System.Net;
@ -95,18 +95,18 @@ namespace LazyTableImages {
Controller.TableView.ReloadData ();
}
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 Controller.Apps.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)
{
UITableViewCell cell;
// If the list is empty, put in a 'loading' entry
@ -130,7 +130,7 @@ namespace LazyTableImages {
// Set the tag of each cell to the index of the App that
// it's displaying. This allows us to directly match a cell
// with an item when we're updating the Image
var app = Controller.Apps [indexPath.Row];
var app = Controller.Apps [(int)indexPath.Row];
cell.Tag = indexPath.Row;
cell.TextLabel.Text = app.Name;
cell.DetailTextLabel.Text = app.Artist;

2
LazyTableImages/RootViewController.designer.cs сгенерированный
Просмотреть файл

@ -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 LazyTableImages {