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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:00:12+00:00 2026-05-18T12:00:12+00:00

so i am using presentmodalviewcontroller to change the active views in an ipad app.

  • 0

so i am using presentmodalviewcontroller to change the active views in an ipad app. however when i try to change it using the statement [self presentModalViewController:createCharacter animated:NO]; in an ibaction that is triggered by a button. however i get an error saying expected expression before ‘createCharacter’. createCharacter is a custom view controller that i have created… does anyone know what i am doing wrong? if you need any more relevant code just let me know,thanks

additional relevant code:

#import "createCharacter.h";


-(IBAction) buildCharacter{
    [self presentModalViewController:createCharacter animated:NO];      
}

createCharacter.h :

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

@interface createCharacter : UIViewController {
    IBOutlet UIView *view;
}

@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-18T12:00:13+00:00Added an answer on May 18, 2026 at 12:00 pm

    I’d love to see some code to look at, and without it maybe this advice will be wrong, BUT…in my experience I’ve always used IBActions with a single argument, and that argument has always been the sender, so something like tying a button press to `

    -(IBAction) presentNewController:(id)sender` 
    

    where sender is the button that was pressed.

    If you use a method like that to detect the button press from IB, then in code what you would want is something like:

    // In your current view controller, the target where you wired up the button
    -(IBAction) presentNewController:(id)sender
    {
        if([sender isEqual:<whatever button you expect>])
        {
            CustomController *con = [[[CustomController alloc] init] autorelease];
            [selfpresentModalViewController:con animated:YES];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am adding a modal view using the following code: [self presentModalViewController:phrasesEditor animated:YES]; How
Using C#, I need a class called User that has a username, password, active
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I'm trying to change view upon receive a push notification while the app is
I'm using MFMailComposeViewController for in-app email in my app, but I'm not able to
I have a strange problem when I try to deploy my current app to
I am currently using this code to bring up an info window -(IBAction)showInfo:(id)sender {
I have a problem, using presentModalViewController to display a UIView. Within the Application I
Using online interfaces to a version control system is a nice way to have

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.