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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:20:43+00:00 2026-05-20T17:20:43+00:00

My Info button is showing up when I run my app but it doesn’t

  • 0

My Info button is showing up when I run my app but it doesn’t do anything, no response when I click it.

In my ProfileViewController file:

- (void)viewDidLoad
{
    UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoDark];
    infoButton.frame = CGRectMake(290.0, 10.0, 15.0, 15.0);
    [infoButton addTarget:self action:@selector(toggleCreditsOpen:)forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:infoButton];

    [super viewDidLoad];
}

I also have the following two methods to load the about view (the screen that loads up when the button is clicked):

- (IBAction) toggleCreditsOpen:(id)inSender
{   
    UIViewController *theController = [[UIViewController alloc] initWithNibName:@"AboutViewController" bundle:nil];
    [self.navigationController presentModalViewController:theController animated:TRUE];
}

- (IBAction) toggleCreditsClosed:(id)inSender
{
    [self.navigationController dismissModalViewControllerAnimated:TRUE];
}

EDIT:
I am adding my full implementation file here:

#import "ProfileViewController.h"
#import "AboutViewController.h"

@implementation ProfileViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)dealloc
{
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

- (IBAction)toggleCreditsOpen:(id)inSender
{   
    UIViewController *theController = [[UIViewController alloc] initWithNibName:@"AboutViewController" bundle:nil];
    [self.navigationController presentModalViewController:theController animated:YES];
}

- (IBAction)toggleCreditsClosed:(id)inSender
{
    [self.navigationController dismissModalViewControllerAnimated:TRUE];
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    UIButton *infoButton = [[UIButton buttonWithType:UIButtonTypeInfoDark] retain];
    infoButton.frame = CGRectMake(290.0, 10.0, 15.0, 15.0);
    //[infoButton addTarget:self action:@selector(toggleCreditsOpen:)forControlEvents:UIControlEventTouchUpInside];
    [infoButton addTarget:self action:@selector(toggleCreditsOpen:)forControlEvents:UIControlEventTouchDown];
    [self.view addSubview:infoButton];

    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
  • 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-20T17:20:44+00:00Added an answer on May 20, 2026 at 5:20 pm

    Using your provided code works for me, if self.navigationController is non-nil, and there exists an AboutViewController.xib in your main bundle. Otherwise, I don’t see anything readily wrong.

    If you don’t have a navigation controller, the proper line in toggleCreditsOpen: would be:

    [self presentModalViewController:theController animated:YES];
    

    Edit:

    If you want to dismiss the modal view later, its usually a good idea to do this with a delegate. Instead of

    UIViewController *theController = [[UIViewController alloc] initWithWhatever];
    

    you can do

    AboutViewController *theController = [[AboutViewController alloc] initWithWhatever];
    

    where AboutViewController has a delegate. Probably something like id<DismissModalProtocol> delegate;. Then, your view controller would implement this @protocol, and before it calls presentModalViewController:animated:, it’ll set itself as the delegate. So very roughly, it would look something like this:

    // AboutViewController.h
    @protocol DismissModalProtocol;
    
    @interface AboutViewController : UIViewController {
      id<DismissModalProtocol> delegate;
    }
    @property id<DismissModalProtocol> delegate;
    @end
    
    @protocol DismissModalProtocol <NSObject>
    - (void)dismissController:(UIViewController *)viewController;
    @end
    
    
    // ProfileViewController.h
    #import "AboutViewController.h"
    
    @interface ProfileViewController : UIViewController <DismissModalProtocol>
    @end
    
    
    // ProfileViewController.m
    @implementation ProfileViewController
    - (void)dismissController:(UIViewController *)viewController {
      [self dismissModalViewControllerAnimated:YES];
    }
    
    - (void)toggleCreditsOpen:(id)sender {
      AboutViewController *controller = [[AboutViewController alloc] init];
      controller.delegate = self;
      [self presentModalViewController:controller animated:YES];
    }
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've had a lot of users complain that the little i info button is
It seems like Info.plist file has an ability to declare different roles for the
I have found some info on the subject ( like this link) , but
Info - for better formatting, I used code-formatting throughout the whole posting. Hi, I
I need some info on how to use margins and how exactly padding works.
any bit of info will be helpful here. or does anybody else huge do
Some background info; LanguageResource is the base class LanguageTranslatorResource and LanguageEditorResource inherit from LanguageResource
self.logger.info(msg) popinstance=poplib.POP3(self.account[0]) self.logger.info(popinstance.getwelcome()) popinstance.user(self.account[1]) popinstance.pass_(self.account[2]) try: (numMsgs, totalSize)=popinstance.stat() self.logger.info(POP contains + str(numMsgs) + emails)
In through php_info() where the WSDL cache is held ( /tmp ), but I
Could someone give some info regarding the different character sets within visual studio's project

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.