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

  • SEARCH
  • Home
  • 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 7028497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:23:43+00:00 2026-05-28T00:23:43+00:00

I’ve looked at the Apple appPrefs code sample, but that seems to be for

  • 0

I’ve looked at the Apple appPrefs code sample, but that seems to be for navigation controllers only. I’m working with an iPad UISplitViewController that has simple root and detail VCs.

I can change certain settings (colors, date formats, etc) but currently, I have to restart the app to have the changes effected. I would prefer not to have to restart the app.

I’m using a system of loading the settings when the app starts each time. I can get a notification system to work, but I don’t know how to reload the view controllers.

Any ideas how to do this (I guess reload the views somehow).

Thanks for any tips/advice. I can post some code if relevant.

  • 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-28T00:23:44+00:00Added an answer on May 28, 2026 at 12:23 am
    • If you use settings bundle to manage preferences from the Settings app:

      From what you said in your question, you already know how to get a notification(UIApplicationDidBecomeActiveNotification) when your app becomes active, right?

      If so, the only problem left is how to reload your view after you receive the notification. Other than UITableView, which can be easily reloaded by calling [tableView reloadData], you have to reload your view by assigning values to the UI controls that you want to reload just as you set them up initially. Say you have a UILabel label you want to reload with the newly set preference value, you just write code like this:

      - (void)reloadView {
          label.text = [[NSUserDefaults standardUserDefaults] stringForKey:@"PreferenceKey"];
          self.view.background = …
          [self.tableView reloadData];
      }
      
      - (void)reloadViewOnAppActivation:(NSNotification *)notif {
          [self reloadView];
      }
      
    • If you are using in app preferences setting:

      1. If the preferences view controller does not display simultaneously with the SplitViewController. Reload your views in their controllers’ viewWillAppear: methods:

        - (void)viewWillAppear:(BOOL)animated {
            [super viewWillAppear:animated];
            [self reloadView]; // See the definition of reloadView above
        }
        
      2. Otherwise, make the SplitViewController the delegate of, or assign it to an ivar of, the preferences view controller, and notify it of the preferences changes when appropriate — immediately after changing any single preference if you prefer in realtime update, or after all the changes are done if you prefer batch update:

        // SplitViewController methods:
        - (void)preferencesAreChanged {
            [self reloadView]; // See the definition of reloadView above
        }
        
        // Preferences view controller methods:
        // Immediate update, use a preference controlled by a `UISegmentedControl` as an example
        - (void)viewDidLoad {
            [super viewDidLoad];
            …
            [segmentedControl addTarget:self action:@selector(xPreferenceTogglingAction:) forControlEvents:UIControlEventValueChanged];
            …
        }
        
        - (IBAction)xPreferenceTogglingAction:(id)sender {
            // Update the x preference.
            …
            [delegate preferencesAreChanged];
        }
        
        // Batch update
        - (void)viewWillDisappear:(BOOL)animated {
            [delegate preferencesAreChanged];
            [super viewWillDisappear:animated];
        }
        
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.