PassKit: Fix navigation bar overlapping buttons at the top of the screen.

This commit is contained in:
Timothy Risi 2013-09-13 16:52:21 -08:00
Родитель 60274b71d6
Коммит aff99d212c
2 изменённых файлов: 25 добавлений и 9 удалений

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

@ -40,21 +40,20 @@ namespace PassLibrary {
table.AutoresizingMask = UIViewAutoresizing.All;
refreshButton = UIButton.FromType (UIButtonType.RoundedRect);
refreshButton.Frame = new RectangleF (230, 50, 80, 40);
refreshButton.SetTitle ("Refresh", UIControlState.Normal);
refreshButton.TouchUpInside += HandleRefreshTouchUpInside;
addPassButton = UIButton.FromType (UIButtonType.RoundedRect);
addPassButton.Frame = new RectangleF (10, 50, 80, 40);
addPassButton.SetTitle ("Add", UIControlState.Normal);
addPassButton.TouchUpInside += HandleAddTouchUpInside;
replacePassButton = UIButton.FromType (UIButtonType.RoundedRect);
replacePassButton.Frame = new RectangleF (100, 50, 80, 40);
replacePassButton.SetTitle ("Replace", UIControlState.Normal);
replacePassButton.TouchUpInside += HandleReplaceTouchUpInside;
passLibraryAvailableLabel = new UILabel (new RectangleF (10, 5, 300, 40));
passLibraryAvailableLabel = new UILabel ();
passLibraryAvailableLabel.Text = "Pass Library Available: " + PKPassLibrary.IsAvailable.ToString ();
if (PKPassLibrary.IsAvailable) {
@ -80,6 +79,18 @@ namespace PassLibrary {
addPassButton.Enabled = false;
}
if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) {
refreshButton.Frame = new RectangleF (230, 114, 80, 40);
addPassButton.Frame = new RectangleF (10, 114, 80, 40);
replacePassButton.Frame = new RectangleF (100, 114, 80, 40);
passLibraryAvailableLabel.Frame = new RectangleF (10, 69, 300, 40);
} else {
refreshButton.Frame = new RectangleF (230, 50, 80, 40);
addPassButton.Frame = new RectangleF (10, 50, 80, 40);
replacePassButton.Frame = new RectangleF (100, 50, 80, 40);
passLibraryAvailableLabel.Frame = new RectangleF (10, 5, 300, 40);
}
Add (table);
Add (passLibraryAvailableLabel);
Add (refreshButton);

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

@ -22,7 +22,8 @@
<MtouchDebug>True</MtouchDebug>
<ConsolePause>False</ConsolePause>
<MtouchLink>None</MtouchLink>
<MtouchI18n />
<MtouchI18n>
</MtouchI18n>
<MtouchUseArmv7>false</MtouchUseArmv7>
<MtouchArch>ARMv7</MtouchArch>
</PropertyGroup>
@ -34,7 +35,8 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<MtouchLink>None</MtouchLink>
<MtouchI18n />
<MtouchI18n>
</MtouchI18n>
<MtouchUseArmv7>false</MtouchUseArmv7>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
@ -48,9 +50,11 @@
<MtouchDebug>True</MtouchDebug>
<ConsolePause>False</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchI18n />
<MtouchI18n>
</MtouchI18n>
<MtouchUseArmv7>false</MtouchUseArmv7>
<IpaPackageName />
<IpaPackageName>
</IpaPackageName>
<MtouchArch>ARMv7</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
@ -62,7 +66,8 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>False</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchI18n />
<MtouchI18n>
</MtouchI18n>
<MtouchUseArmv7>false</MtouchUseArmv7>
</PropertyGroup>
<ItemGroup>