Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 229003a

Browse files
committed
Fix NSInternalInconsistencyException and update to unified
1 parent 468b346 commit 229003a

File tree

5 files changed

+27
-20
lines changed

5 files changed

+27
-20
lines changed

ios/content_controls/navigation_controller/add_a_nav_bar_bottom_toolbar/AppDelegate.cs

+13-12
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
using System.Collections.Generic;
33
using System.Linq;
44

5-
using MonoTouch.Foundation;
6-
using MonoTouch.UIKit;
5+
using Foundation;
6+
using UIKit;
77

8-
namespace NavBarToolbar {
8+
namespace NavBarToolbar
9+
{
910
// The UIApplicationDelegate for the application. This class is responsible for launching the
1011
// User Interface of the application, as well as listening (and optionally responding) to
1112
// application events from iOS.
1213
[Register ("AppDelegate")]
13-
public partial class AppDelegate : UIApplicationDelegate {
14+
public partial class AppDelegate : UIApplicationDelegate
15+
{
1416
// class-level declarations
1517
UIWindow window;
1618
UINavigationController navigationController;
@@ -27,18 +29,17 @@ public override bool FinishedLaunching (UIApplication app, NSDictionary options)
2729
{
2830
// create a new window instance based on the screen size
2931
window = new UIWindow (UIScreen.MainScreen.Bounds);
30-
31-
viewController = new NavBarViewController();
32-
33-
navigationController = new UINavigationController();
32+
33+
viewController = new NavBarViewController ();
34+
35+
navigationController = new UINavigationController ();
3436
navigationController.PushViewController (viewController, false);
3537

36-
// If you have defined a view, add it here:
37-
window.AddSubview (navigationController.View);
38-
38+
window.RootViewController = navigationController;
39+
3940
// make the window visible
4041
window.MakeKeyAndVisible ();
41-
42+
4243
return true;
4344
}
4445
}

ios/content_controls/navigation_controller/add_a_nav_bar_bottom_toolbar/Info.plist

+2
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@
1818
<string>Resources/Images.xcassets/AppIcons.appiconset</string>
1919
<key>XSLaunchImageAssets</key>
2020
<string>Resources/Images.xcassets/LaunchImage.launchimage</string>
21+
<key>MinimumOSVersion</key>
22+
<string>5.1.1</string>
2123
</dict>
2224
</plist>

ios/content_controls/navigation_controller/add_a_nav_bar_bottom_toolbar/Main.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
using System.Collections.Generic;
33
using System.Linq;
44

5-
using MonoTouch.Foundation;
6-
using MonoTouch.UIKit;
5+
using Foundation;
6+
using UIKit;
77

88
namespace NavBarToolbar {
99
public class Application {

ios/content_controls/navigation_controller/add_a_nav_bar_bottom_toolbar/NavBarToolbar.csproj

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
<ProductVersion>8.0.30703</ProductVersion>
77
<SchemaVersion>2.0</SchemaVersion>
88
<ProjectGuid>{9785D147-C90E-47FD-A1A0-CBD233E708BB}</ProjectGuid>
9-
<ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
9+
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1010
<OutputType>Exe</OutputType>
1111
<RootNamespace>NavBarTrans</RootNamespace>
1212
<AssemblyName>NavBarTrans</AssemblyName>
13+
<TargetFrameworkIdentifier>Xamarin.iOS</TargetFrameworkIdentifier>
14+
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
1315
</PropertyGroup>
1416
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
1517
<DebugSymbols>true</DebugSymbols>
@@ -47,6 +49,7 @@
4749
<MtouchProfiling>true</MtouchProfiling>
4850
<IpaPackageName>
4951
</IpaPackageName>
52+
<MtouchArch>ARMv7</MtouchArch>
5053
</PropertyGroup>
5154
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
5255
<DebugType>none</DebugType>
@@ -56,12 +59,13 @@
5659
<WarningLevel>4</WarningLevel>
5760
<ConsolePause>false</ConsolePause>
5861
<CodesignKey>iPhone Developer</CodesignKey>
62+
<MtouchArch>ARMv7, ARM64</MtouchArch>
5963
</PropertyGroup>
6064
<ItemGroup>
6165
<Reference Include="System" />
6266
<Reference Include="System.Xml" />
6367
<Reference Include="System.Core" />
64-
<Reference Include="monotouch" />
68+
<Reference Include="Xamarin.iOS" />
6569
</ItemGroup>
6670
<ItemGroup>
6771
<None Include="Info.plist" />
@@ -75,5 +79,5 @@
7579
<ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Contents.json" />
7680
<ImageAsset Include="Resources\Images.xcassets\LaunchImage.launchimage\Contents.json" />
7781
</ItemGroup>
78-
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />
82+
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
7983
</Project>

ios/content_controls/navigation_controller/add_a_nav_bar_bottom_toolbar/NavBarViewController.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Drawing;
3+
using CoreGraphics;
44
using System.Linq;
5-
using MonoTouch.Foundation;
6-
using MonoTouch.UIKit;
5+
using Foundation;
6+
using UIKit;
77

88
namespace NavBarToolbar {
99
public class NavBarViewController : UIViewController {

0 commit comments

Comments
 (0)