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

  • Home
  • SEARCH
  • 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 8189305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:13:57+00:00 2026-06-07T03:13:57+00:00

I have a small problem in Push notification Service in iphone. I have implemented

  • 0

I have a small problem in Push notification Service in iphone.
I have implemented the push notification in iphone and it works very well.

My problem is that

APPLICATION CLOSE-when my app is closed and when I get notification alert, On click of view button of notification I go to my alert view page.
On that alert page I have a back button when I click it,I go to my other page which is fixed.

APPLICATION ON- when my app is on and i am in one of my page.And notification alert comes, On click of view button of notification I go to my alert view page same as above.
But now when I click back button I want to go the previous page where I was before notification. Not on fixed page as when app is closed.

How should I do this in iphone?

Please share your logic / idea to resolve my problem?

  • 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-07T03:13:59+00:00Added an answer on June 7, 2026 at 3:13 am

    Every time you are directed from the notification, replace your navigation stack.
    Let’s assume that FirstViewController is where you want to be back after clicking the backbutton. And SecondViewController is where you want to go when clicking on the alert.

    So each time you are refering from notification, replace your navigation stack by

    FirstViewController  *objFirstViewController  = [[FirstViewController alloc] initWithNIBName: @"FirstViewController" bundle: nil];
    SecondViewController *objSecondViewController = [[SecondViewController alloc] initWithNIBName: @"SecondViewController" bundle: nil];
    NSArray *aryControllers = [NSArray arrayWithObjects: objFirstViewController,objSecondViewController, nil];
    [self.navigationController setViewControllers: aryControllers animated: YES];
    [objFirstViewController release];   
    [objSecondViewController release];
    

    As the you pop back from the presented view you will always get the FirstViewController.
    The above one is for the situation when your app is not in background (or CLOSED).
    For the condition which your app is in background and when you receive the notification,

    From the AppDelegate application:didReceiveRemoteNotification: you can push the view just as you push normally. Then it will return back to the previous page that you are in before you got the notification.(In the assumption that you are using the global navigation controller through out the whole project)

    Glad if this helps you in anyway.

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

Sidebar

Related Questions

OSX 10.7, XCode 4. I have a small problem: I need to push back
have small problem, and would very much appreciate help :) I should convert byte
I have a problem that I can't figure out. I'm building a small framework
I have an application that uses Doctrine ORM for entities. I try to push
Using .NET 4.0, I have a small ASP.NET app that utilized the ReportViewer object,
I have developed a small application using MVC RC2. The application works fine in
I have small problem with Spring MVC. Basically what I'm trying to do is
I have a small problem and I've figured out where when and why it
I have a small problem which i can't seem to figure out. I tried
I have a small problem which i can't seem to solve myself. Look at

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.