Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

NavigationBar.Translucent = false failing on device

$
0
0

Hi,

I am trying to set my navigation bar to be solid by setting this.NavigationController.NavigationBar.Translucent = false;.

This works fine on the simulator but when I try running the same code on my iOS7 device I get the following exception:

System.InvalidCastException: Cannot cast from source type to destination type.
  at at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr)
  at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject[UINavigationBar] (IntPtr ptr, System.Type type,
    MissingCtorResolution missingCtorResolution) [0x00000] in <filename unknown>:0
  at MonoTouch.ObjCRuntime.Runtime.GetNSObject[UINavigationBar] (IntPtr ptr) [0x00000] in <filename unknown>:0
  at MonoTouch.UIKit.UINavigationController.get_NavigationBar () [0x00008] in  
    /Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UINavigationController.g.cs:391
  at Phoenix.SidebarViewController.ViewDidLoad () [0x0001f] in 
    /Users/clint/Documents/Sandbox/Phoenix/Phoenix/Controllers/Sidebar/SidebarViewController.cs:29
  at at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr)
  at MonoTouch.UIKit.UIWindow.MakeKeyAndVisible () [0x00008] in 
    /Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UIWindow.g.cs:129
  at Phoenix.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00038] in /Users/clintsinger/Documents/WolfTek/Sandbox/Phoenix/Phoenix/AppDelegate.cs:48
  at at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UIApplication.cs:38
  at Phoenix.Application.Main (System.String[] args) [0x00008] in    
    /Users/clint/Documents/Sandbox/Phoenix/Phoenix/Main.cs:16`

Here are my Xamarin Studio details:

=== Xamarin Studio ===

Version 4.2.2 (build 2)
Runtime:
Mono 3.2.5 ((no/964e8f0)
GTK+ 2.24.20 theme: Raleigh
GTK# (2.12.0.0)
Package version: 302050000

=== Xamarin.Android ===

Version: 4.10.1
Android SDK: /Developer/adt-bundle/sdk
Supported Android versions:
    4.0   (API level 14)
    4.0.3 (API level 15)
    4.1   (API level 16)
    4.2   (API level 17)
    4.3   (API level 18)
    4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Apple Developer Tools ===

Xcode 5.0 (3332.22)
Build 5A1412

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.iOS ===

Version: 7.0.5.2
Hash: 9c42159
Branch: 
Build date: 2013-02-12 20:04:08-0500

=== Build Information ===

Release ID: 402020002
Git revision: c5f82958ae7d9af652b44b87ceff777b3ad19b91
Build date: 2013-11-19 15:35:40+0000
Xamarin addins: a4044fee09138f6fd031a9944b7caaeb51e57e80

=== Operating System ===

Mac OS X 10.9.1
Darwin 13.0.0 Darwin Kernel Version 13.0.0
    Thu Sep 19 22:22:27 PDT 2013
    root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64

Cheers, Clint


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>