{"id":4065,"date":"2014-03-30T07:26:54","date_gmt":"2014-03-30T07:26:54","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ios-7-uinavigationbar-settranslucent-no-crashes-app-duplicate-collection-of-common-programming-errors\/"},"modified":"2014-03-30T07:26:54","modified_gmt":"2014-03-30T07:26:54","slug":"ios-7-uinavigationbar-settranslucent-no-crashes-app-duplicate-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ios-7-uinavigationbar-settranslucent-no-crashes-app-duplicate-collection-of-common-programming-errors\/","title":{"rendered":"iOS 7 UINavigationbar setTranslucent: NO crashes app [duplicate]-Collection of common programming errors"},"content":{"rendered":"<p>I have a UINavigationBar that has a background image set up in the app delegate class, so you can imagine why I would not like the Navigationbar to be translucent. I believe it is the culprit for this: http:\/\/imgur.com\/v3e0NIo<\/p>\n<p>Anyways when I put this line of code:<\/p>\n<pre><code>[[UINavigationBar appearance] setTranslucent:NO];\n<\/code><\/pre>\n<p>in my AppDelegate I encounter this error:<\/p>\n<pre><code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** Illegal property type, B for appearance setter, _installAppearanceSwizzlesForSetter:'\n<\/code><\/pre>\n<p>Even when I try to individually make every UINavigationbar non-transparent in each class, I still have that stupid white bar in the image! No errors are thrown though, which makes me wonder if the code just doesn&#8217;t work, or if transparency is not my problem?<\/p>\n<p>Thanks!<\/p>\n<p>EDIT:<\/p>\n<p>Here is the code I am using in my AppDelegate to make the custom background for the NavBar:<\/p>\n<pre><code>[[UINavigationBar appearance] setTitleTextAttributes: @{\n                                                        UITextAttributeTextColor: [UIColor whiteColor],\n                                                        UITextAttributeTextShadowColor: [UIColor blackColor],\n                                                        UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetMake(0.0f, 1.0f)],\n                                                        UITextAttributeFont: [UIFont fontWithName:@\"Code-Bold\" size:23.0f]\n                                                        }];\n[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:NO];\n\nUIImage *navBarImage = [[UIImage imageNamed:@\"menubar.png\"] resizableImageWithCapInsets:UIEdgeInsetsMake(5, 15, 5, 15)];\n\n[[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsDefault];\n<\/code><\/pre>\n<p><strong>Even when I make the UIViewController&#8217;s background black, the white bar is still there.. I now highly doubt transparency is my problem!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a UINavigationBar that has a background image set up in the app delegate class, so you can imagine why I would not like the Navigationbar to be translucent. I believe it is the culprit for this: http:\/\/imgur.com\/v3e0NIo Anyways when I put this line of code: [[UINavigationBar appearance] setTranslucent:NO]; in my AppDelegate I encounter [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4065","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4065"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4065\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}