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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:17:47+00:00 2026-06-02T16:17:47+00:00

THX FOR THE HELP! I changed the Viewdidload like that and it is working

  • 0

THX FOR THE HELP!

I changed the Viewdidload like that and it is working fine for me now! Iam Fetching the location and took a predicate to synchronize the checks and the state of the button

  - (void)viewDidLoad
  {
    [super viewDidLoad];
    app = (AppDelegate *) [[UIApplication sharedApplication] delegate];

    NSManagedObjectContext *context = [app managedObjectContext];
    NSFetchRequest *request = [[NSFetchRequest alloc] init];
    NSEntityDescription *entity = [NSEntityDescription entityForName:@"Standort" inManagedObjectContext:context];
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ortcheck CONTAINS YES"];
    [request setPredicate:predicate];
    [request setEntity:entity];

    NSError *error = nil;
    NSArray *events = [context executeFetchRequest:request error:&error];    
    int i = events.count;

    if (i == 0) {

        myWeiter = [[UIBarButtonItem alloc] initWithTitle:@"Weiter" style:UIBarButtonItemStyleBordered target:self action:@selector(nextPressed:)];

        self.navigationItem.rightBarButtonItem = myWeiter;


         self.navigationItem.rightBarButtonItem.enabled = NO;
    }
    else {
        myWeiter = [[UIBarButtonItem alloc] initWithTitle:@"Weiter" style:UIBarButtonItemStyleBordered target:self action:@selector(nextPressed:)];

        self.navigationItem.rightBarButtonItem = myWeiter;


        self.navigationItem.rightBarButtonItem.enabled = YES;
    }
  • 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-06-02T16:17:48+00:00Added an answer on June 2, 2026 at 4:17 pm

    Add a check counter as an instance member, and initialize it to 0, on each check increase it, and on each uncheck decrease it, after each check set the button:

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
        // snip
    
        //if (cell.checkButton.hidden==YES){
        //    cell.checkButton.hidden=NO;
        //}else {
        //    cell.checkButton.hidden=YES;
        //}
        BOOL state = !cell.checkButton.hidden;
        cell.checkButton.hidden=state; // simpler
        self.counter += (state) ? 1 : -1;
        [nextButton setEnabled: counter > 0];
    
        // snap
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hey guys, I need help considering win32com in Python: I have a routine that
Dear fellow programmers, I am working on my B&B's website www.bordemundo.com and would like
When I analyse my code with Xcode,I have this error: Thx for help.
now I need help with setting variable. I have two entities Season and Tournament,
i hope someone can help me... my code look like this [[NSNotificationCenter defaultCenter] addObserver:self
i have a Spring application and its working well so far. Now i want
How to display unicode for micron or lower case Mu in a CEdit? thx
For the following code snippets why would I use one assignment vs another? thx
I changed a gridview's header to ... with Sub MakeAccessible(ByVal grid As GridView) If
i've got a few questions about applets in java. Let's say that my app

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.