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 7166791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:28:13+00:00 2026-05-28T14:28:13+00:00

I read the similar problems and solutions regarding this issue, but it didn’t help

  • 0

I read the similar problems and solutions regarding this issue, but it didn’t help me. Let’s say, I’ve got 3 UIViewControlers app.

  1. At view #2 I placed a picture (.png) red/green (on/off). An int getting retrieved from db, if 1=green else red. It works fine for me.

  2. At view #3, I am using UISwitcher to switch the int to values 1 or 0. It also doing well.

The problem. When I am pushing back to view #2 from #3, the picture stays unchanged. And only after pushing to view #1 and back to view #2, I’m getting the image changed.

The data getting retrieved in - (void)viewDidLoad method.

What I tried to do meanwhile:

Have added method - (void)viewWillAppear:(BOOL)animated

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.tableView reloadData];
}

Also I tried to call database method in - (void)viewWillAppear:(BOOL)animated.

Alas, it doesn’t help.

Thank you for reading this and helping me.

  • 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-28T14:28:14+00:00Added an answer on May 28, 2026 at 2:28 pm

    Make the view 2 register to get notification for int value changed..and in view 3 ..when you change int..post the notification using [NSNotification defaultcenter]

    1) In viewDidLoad of View 2

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(intChanged) name:@"Int Changed" object:nil];
    

    2) In Dealloc of view 2

     [[NSNotificationCenter defaultCenter] removeObserver:self];
    

    3) In view 3 ..when you change int after that put this line

    [[NSNotificationCenter defaultCenter] postNotificationName:@"Int Changed" object:nil userInfo:nil];
    

    In the end..intChanged method(in view 2) will be called when int value is changed in view 3 make sure you define a method intChanged in view 2

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

Sidebar

Related Questions

I have read through the solutions to similar problems, but they all seem to
I have seen couple of similar problems with solutions, but I couldn't find one
I have read similar questions but they talk of AI models. What I want
I've read similar questions here but I'm still a little confused. MyCollection extends ArrayList<MyClass>
I read through quite a few similar questions here on SO but none were
Read on before you say this is a duplicate, it's not. (as far as
i've already read all tha articles in here wich touch a similar problem but
There are plenty of examples of similar problems littered around the web but none
Okay this is similar to my last question but what I ended up doing
I've read Get File Icon used by Shell and the other similar posts -

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.