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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:31:59+00:00 2026-05-13T23:31:59+00:00

Here is my code: – (void)loadView { //hard coded array of content for each

  • 0

Here is my code:

- (void)loadView {

  //hard coded array of content for each site

  // CC
  NSMutableArray *allccContent = [[NSMutableArray alloc] init];

  NSString *cc1 = @"House Model";
  NSString *cc2 = @"James Dexter History";

  [allccContent addObject: cc1];
  [cc1 release];

  [allccContent addObject: cc2];
  [cc2 release];

  // FC
  NSMutableArray *allfcContent = [[NSMutableArray alloc] init];

  NSString *fc1 = @"Ghost House";
  NSString *fc2 = @"Franklins Letters";
  NSString *fc3 = @"Franklins Business";

  [allfcContent addObject: fc1];
  [fc1 release];

  [allfcContent addObject: fc2];
  [fc2 release];

  [allfcContent addObject: fc3];
  [fc3 release];

  // PC
  NSMutableArray *allphContent = [[NSMutableArray alloc] init];

  NSString *ph1 = @"Changing Occupancy";
  NSString *ph2 = @"Sketches";
  NSString *ph3 = @"Servant House";
  NSString *ph4 = @"Monument";
  NSString *ph5 = @"Virtual Model";

  [allphContent addObject: ph1];
  [ph1 release];

  [allphContent addObject: ph2];
  [ph2 release];

  [allphContent addObject: ph3];
  [ph3 release];

  [allphContent addObject: ph4];
  [ph4 release];

  [allphContent addObject: ph5];
  [ph5 release];

  // Each content page's view

  //UIView *ccContent = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
  UIView *fcContent = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
  UIView *phContent = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];

  //ccContent.backgroundColor = [UIColor whiteColor];
  fcContent.backgroundColor = [UIColor whiteColor];
  phContent.backgroundColor = [UIColor whiteColor];

  //[ccContent addSubview:[SiteOneController myNavBar1:@"Constitution Center Content"]];
  [fcContent addSubview:[SiteOneController myNavBar1:@"Franklin Court Content"]];
  [phContent addSubview:[SiteOneController myNavBar1:@"Presidents House Content"]];  

  //allocate the view
  self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];

  //set the view's background color
  self.view.backgroundColor = [UIColor whiteColor];

  [self.view addSubview:[SiteOneController myNavBar1:@"Sites"]];

  NSMutableArray *sites = [[NSMutableArray alloc] init];

  NSString *one = @"Constution Center";
  NSString *two = @"Franklin Court";
  NSString *three = @"Presidents House";

  [sites addObject: one];
  [one release];

  [sites addObject: two];
  [two release];

  [sites addObject: three];
  [three release];

  NSString *ccName = @"Constitution Center";
  NSString *fcName = @"Franklin Court";

  NSString *element;
  int j = 0;
  for (element in sites)
  {
   UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];

   //setframe (where on screen)
   //separation is 15px past the width (45-30)
   button.frame = CGRectMake(a, b + (j*45), c, d);

   [button setTitle:element forState:UIControlStateNormal];

   button.backgroundColor = [SiteOneController myColor1];

   /*- (void) fooFirstInput:(NSString*) first secondInput:(NSString*) second {
    NSLog(@"Logs %@ then %@", first, second);
   }
   - (void) performMethodsViaSelectors {
    [self performSelector:@selector(fooNoInputs)];
    [self performSelector:@selector(fooOneInput:) withObject:@"first"];
    [self performSelector;@selector(fooFirstInput:secondInput:) withObject:@"first" withObject:@"second"];*/

   //UIView *old = self.view;

   if (element == ccName) {
    [button addTarget:self action:@selector(showCCView:)
     forControlEvents:UIControlEventTouchUpInside];
    }
    else if (element == fcName) {

    }
    else {

    }

   [self.view addSubview: button];
   j++;
  }

 }

// This method show the content views for each of the sites.
+ (void) showCCView:(id) sender {
 NSLog(@"CC CLICKED");
 //UIView *current = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
 //[current addSubview:[SiteOneController ccContent]];
}

Now why isn’t the showCCView method getting called when the button is clicked? What am I doing wrong?

  • 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-13T23:31:59+00:00Added an answer on May 13, 2026 at 11:31 pm
    + (void) showCCView:(id) sender {
        NSLog(@"CC CLICKED");
        //UIView *current = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
        //[current addSubview:[SiteOneController ccContent]];
    }
    

    Because that’s a class method, not an instance method. Change the + to a -.

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

Sidebar

Related Questions

My code here works fine to get the content length, and tells me how
Here is code <h:outputLink styleClass=button value=javascript:void(0);> Text <f:ajax execute=@form event=click listener=#{commentView.saveComment} render=main_form /> </h:outputLink>
Here code (executed in php 5.3.5 and 5.2.13): $res = array(1, 2, 3); unset($res[0]);
I have UiTextView where I want change font size (increase), here code -(void)biggerFont:(UIBarButtonItem *)
here code delegate void CheckNewsDelegate(); void CheckNews() { frmNews news = new frmNews(); news.Show();
Here is code: procedure DisableContrlOL(const cArray : array of string; ReEnable : boolean =
The script is on jsfiddle here : CODE What it does at the moment
Ok the error is showing up somewhere in this here code if($error==false) { $query
Here is code my jqgrid editing through form. $(#DataEnergy).jqGrid('navGrid', '#pagergrid', {}, //options {editdata: {
Here my code, I need to insert into mysql database I have mysql,php,android 1)

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.