FontList sample ported to 64-bits

This commit is contained in:
Paola Villarreal 2014-05-27 15:23:08 -05:00
Родитель fcb0f0dbdf
Коммит fefb4485fe
10 изменённых файлов: 47 добавлений и 44 удалений

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

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

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

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

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

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

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

@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using UIKit;
using Foundation;
using System.Reflection;
namespace FontList.Code {
@ -23,7 +23,7 @@ namespace FontList.Code {
/// <summary>
/// Called by the TableView to determine how many sections(groups) there are.
/// </summary>
public override int NumberOfSections (UITableView tableView)
public override nint NumberOfSections (UITableView tableView)
{
return navItems.Count;
}
@ -31,25 +31,25 @@ namespace FontList.Code {
/// <summary>
/// Called by the TableView to determine how many cells to create for that particular section.
/// </summary>
public override int RowsInSection (UITableView tableview, int section)
public override nint RowsInSection (UITableView tableview, nint section)
{
return navItems[section].Items.Count;
return navItems[(int)section].Items.Count;
}
/// <summary>
/// Called by the TableView to retrieve the header text for the particular section(group)
/// </summary>
public override string TitleForHeader (UITableView tableView, int section)
public override string TitleForHeader (UITableView tableView, nint section)
{
return navItems[section].Name;
return navItems[(int)section].Name;
}
/// <summary>
/// Called by the TableView to retrieve the footer text for the particular section(group)
/// </summary>
public override string TitleForFooter (UITableView tableView, int section)
public override string TitleForFooter (UITableView tableView, nint section)
{
return navItems[section].Footer;
return navItems[(int)section].Footer;
}
/// <summary>
@ -57,7 +57,7 @@ namespace FontList.Code {
/// </summary>
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
{
NavItem navItem = this.navItems[indexPath.Section].Items[indexPath.Row];
NavItem navItem = this.navItems[(int)indexPath.Section].Items[(int)indexPath.Row];
var cell = tableView.DequeueReusableCell (this.cellIdentifier);
if (cell == null) {
@ -66,7 +66,7 @@ namespace FontList.Code {
}
//---- set the cell properties
cell.TextLabel.Text = this.navItems[indexPath.Section].Items[indexPath.Row].Name;
cell.TextLabel.Text = this.navItems[(int)indexPath.Section].Items[(int)indexPath.Row].Name;
cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
if (navItem.Font != null)
@ -83,7 +83,7 @@ namespace FontList.Code {
public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
{
//---- get a reference to the nav item
NavItem navItem = navItems[indexPath.Section].Items[indexPath.Row];
NavItem navItem = navItems[(int)indexPath.Section].Items[(int)indexPath.Row];
// if the nav item has a proper controller, push it on to the NavigationController
// NOTE: we could also raise an event here, to loosely couple this, but isn't neccessary,

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

@ -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>
@ -25,6 +25,7 @@
<MtouchI18n />
<MtouchSdkVersion>5.0</MtouchSdkVersion>
<MtouchArch>ARMv7</MtouchArch>
<MtouchExtraArgs>--registrar:static --nofastsim --override-abi x86_64</MtouchExtraArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
@ -70,7 +71,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>
@ -133,4 +136,4 @@
<ItemGroup>
<ITunesArtwork Include="Resources\iTunesArtwork.png" />
</ItemGroup>
</Project>
</Project>

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

@ -1,5 +1,5 @@
using System;
using MonoTouch.UIKit;
using UIKit;
using FontList.Code;
using System.Collections.Generic;

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

@ -2,8 +2,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Foundation;
using UIKit;
namespace FontList.Screens.iPad.FontViewer
{

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

@ -11,19 +11,19 @@
namespace FontList.Screens.iPad.FontViewer {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("FontViewerScreen_iPad")]
// Base type probably should be UIKit.UIViewController or subclass
[Foundation.Register("FontViewerScreen_iPad")]
public partial class FontViewerScreen_iPad {
private MonoTouch.UIKit.UIView __mt_view;
private UIKit.UIView __mt_view;
private MonoTouch.UIKit.UITextView __mt_txtMain;
private UIKit.UITextView __mt_txtMain;
#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 FontList.Screens.iPad.FontViewer {
}
}
[MonoTouch.Foundation.Connect("txtMain")]
private MonoTouch.UIKit.UITextView txtMain {
[Foundation.Connect("txtMain")]
private UIKit.UITextView txtMain {
get {
this.__mt_txtMain = ((MonoTouch.UIKit.UITextView)(this.GetNativeField("txtMain")));
this.__mt_txtMain = ((UIKit.UITextView)(this.GetNativeField("txtMain")));
return this.__mt_txtMain;
}
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 FontList.Screens.iPhone.FontViewer
{

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

@ -11,19 +11,19 @@
namespace FontList.Screens.iPhone.FontViewer {
// Base type probably should be MonoTouch.UIKit.UIViewController or subclass
[MonoTouch.Foundation.Register("FontViewerScreen_iPhone")]
// Base type probably should be UIKit.UIViewController or subclass
[Foundation.Register("FontViewerScreen_iPhone")]
public partial class FontViewerScreen_iPhone {
private MonoTouch.UIKit.UIView __mt_view;
private UIKit.UIView __mt_view;
private MonoTouch.UIKit.UITextView __mt_txtMain;
private UIKit.UITextView __mt_txtMain;
#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 FontList.Screens.iPhone.FontViewer {
}
}
[MonoTouch.Foundation.Connect("txtMain")]
private MonoTouch.UIKit.UITextView txtMain {
[Foundation.Connect("txtMain")]
private UIKit.UITextView txtMain {
get {
this.__mt_txtMain = ((MonoTouch.UIKit.UITextView)(this.GetNativeField("txtMain")));
this.__mt_txtMain = ((UIKit.UITextView)(this.GetNativeField("txtMain")));
return this.__mt_txtMain;
}
set {