1

Scenario:

  1. I'm having one application called A. By pressing the button in A then Application B should be launched.
  2. In application B I want to design one button on top left corner. Title of the button is back to the application A.
  3. By pressing the button in Application B the screen should return back to the application A.

For example: If I am using Facebook I should have one button to launch whatsapp. In case of launching whatsapp from Facebook, I should have one button on top left of whatsapp title to go back to Facebook by pressing that button. I need to get back to the Facebook.

DavidG
  • 19,281
  • 13
  • 70
  • 71
Kaushik
  • 11
  • 3

3 Answers3

0

Call finish() on Application B.

Application A is still open and when Application B closes, Application A will show again.

Or you could call Application A, and then finish() Application B, to ensure that action always returns to A.

DrNachtschatten
  • 382
  • 5
  • 10
0

This seems to work

func deleteItem(byId: Int, completion: Result<Void,Error>) -> ());

foo.deleteItem(byId: 1) { result in
   swith result {
      case success():
         // Success case
         handleSuccess(item)
      case let failure(error):
         // Error case
         handleError(error!)
   }
}
Addev
  • 28,535
  • 43
  • 166
  • 288
0

Add finish (); for the button in java.It will kill App B automatically and you will switch back to App A

Anuj Kumar
  • 771
  • 8
  • 21