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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:10:00+00:00 2026-05-23T13:10:00+00:00

I have one base view controller contentViewController with one button the action on button

  • 0

I have one base view controller “contentViewController” with one button
the action on button is

(IBAction) goBack:(id)sender

.h file

@interface ContentView : UIViewController {
}

@property(nonatomic,retain) UIViewController *display;


-(IBAction) goBack:(id) sender;

.m file

@synthesize display;

-(IBAction) goBack:(id)sender{
    UIViewController *view= display;
    [display release];
    [self presentModalViewController:view animated:YES];
}

and there are some other view controllers already exist each view controller contain on button to show content on the contentViewController.. here is one class example:

.h file

@interface Info : UIViewController {

}

-(IBAction) viewHealthInfoContent:(id) sender;

.m file

-(IBAction) viewHealthInfoContent:(id)sender{
    ContentView *cv=[ContentView alloc];
    [cv setDisplay:self];
    [self presentModalViewController:cv animated:YES];
    [cv release];
}

the case is, each time i show content from one view controller i need to go back to it. using that one goBack button on the contentViewController but when i click the go back button it doesn’t do any think !!! any help

  • 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-23T13:10:00+00:00Added an answer on May 23, 2026 at 1:10 pm

    When you want to go back your previous viewController, use dismissModalViewControllerAnimated:: method.

    According source :

    Dismisses the modal view controller that was presented by the receiver.
    

    In iOS, you can display views modally by presenting the controller for the modal view from your current view controller. When you present a view modally using the presentModalViewController:animated: method, the view controller animates the appearance of the view using the technique you specify. (You can specify the desired technique by setting the modalTransitionStyle property.) At the same time, the method creates a parent-child relationship between the current view controller and the modal view controller.

    Source

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

Sidebar

Related Questions

I have a basic MVC 2 (RC2) site with one base-level controller (Home), and
I have a base URL : http://my.server.com/folder/directory/sample And a relative one : ../../other/path How
I'm working on a code base in which we have several configurable types. One
I have one text input and one button (see below). How can I use
How should one have several different controller' actions set a common instance variable for
I create an application base on view based Application project . so i have
I have three models: class ReleaseItem < ActiveRecord::Base has_many :pack_release_items has_one :pack, :through =>
I have one field that I need to sum lets say named items However
I have one thread that writes results into a Queue. In another thread (GUI),
I have one hibernate sequence, that generates all sequence-numbers in my app. When I

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.