Change segue id name programmatically fast

How can I change the identifier name of a specific segment programmatically?

I found this method, but did not work with me:

SWrevealviewcontroller: switching the direction of the offset menu from left to right is pragmatic

Edit:

I have a menu SWreavealviewcontrollerand I want it to be on the left in English and on the right in Arabic.

+4
source share
1 answer

You cannot change the names of programs with software. Since segue defines the transition between two view controllers in the storyboard file of your applications, and you can rename it in your storyboard.

:

performSegue(withIdentifier: "yourSegueID", sender: nil)

:

  • segues segue (, englishSegue arabicSegue).
  • segue. ( , .)
  • (, viewDidLoad ) .
  • , . , :

    if (yourIdentifier == "English") {
        performSegue(withIdentifier: "englishSegue", sender: nil)
    } else if (yourIdentifier == "Arabic") {
        performSegue(withIdentifier: "arabicSegue", sender: nil)
    }
    
+3

Source: https://habr.com/ru/post/1677847/


All Articles