Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3400456
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:53:42+00:00 2026-05-18T04:53:42+00:00

The following code logs NO every time. Help would be very appreciated! Code: NSString

  • 0

The following code logs “NO” every time. Help would be very appreciated!

Code:

 NSString *filePath = @"settings.plist";
 NSDictionary* plistDictionary = [[NSDictionary alloc] initWithContentsOfFile:filePath];
 if ([[plistDictionary objectForKey:@"hideToolBarInDetailedView"] boolValue] == YES) {
     detailedView.hidesBottomBarWhenPushed = YES;
     NSLog(@"YES");
 } else {
     detailedView.hidesBottomBarWhenPushed = NO;
     NSLog(@"NO");
 }
 [plistDictionary release];

settings.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>hideToolBarInDetailedView</key>
 <true/>
</dict>
</plist>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:53:42+00:00Added an answer on May 18, 2026 at 4:53 am

    I suspect the plist file isn’t in the current working directory and the NSDictionary returned by initWithContentsOfFile: is empty or nil. You can verify this by logging plistDictionary:

    NSLog(@"%@", plistDictionary);
    

    One solution would be to specify the full path of the plist file. Or, if the values stored in the plist file are preferences, you could use NSUserDefaults.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following piece of code is used to print the time in the logs:
The following code works as expected: NSLog(@%@, [NSString stringWithString:@test]; // Logs test But when
The following code is used to fetch logs from app engine for further processing.
I have the following code which re-uses a CookieContainer which logs in on the
I would like to implement a way to trace every line of code in
I have the following C# code which logs the user's url in a cookie.
I have the following code: $writer = new Zend_Log_Writer_Stream($path./../../../../data/logs/Log.log); $logger = new Zend_Log($writer); $logger->info(print_r($xm1,true));
I've added the following code to my masterpage (Page_Load) so once a user logs
Given the following code: if (string) { console.log('true!'); } //logs true to the console
I have the following code: foreach (Logs log in _logsDutyStatusChange) { string driverid =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.