Show a differents view with pickerview

Hello, I have a view with a PickerView and a button, depending on the selection in the picker I wish good button opens a specific view. Below is my code, because I have a concern when I click the button it opens always me the same view (saline). you have an idea on the wrong instruction I give. thank you in advance
`import UIKit

class SommaireGeneralViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource {

@IBOutlet weak var picker: UIPickerView!

enum ActionSheetTag: Int {
    case ActionSheet0
    case ActionSheet1

var PlacementAnswer = Int()

var liste = ["Sommaire général", "Région Est", "Région Ouest", "Région Sud", "Région Nord"]

 override func viewDidLoad() {
    self.picker.delegate = self
    self.picker.dataSource = self

func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
    return liste[row]


func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
    return liste.count


func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
    return 1


func pickerView(pickerView: UIPickerView, attributedTitleForRow row: Int, forComponent component: Int) -> NSAttributedString? {
    let titleData = liste[row]
    let myTitle = NSAttributedString(string: titleData, attributes: [NSFontAttributeName:UIFont(name: "Georgia", size: 10.0)!,NSForegroundColorAttributeName:UIColor.whiteColor()])
        return myTitle

@IBAction func Voir(sender: AnyObject) {

    if (PlacementAnswer == 0) {
        self.performSegueWithIdentifier("Saline", sender: self)

    } else if (PlacementAnswer == 1){
        self.performSegueWithIdentifier("Autre", sender: self)
        func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
            if let tag = ActionSheetTag(rawValue: pickerView.tag) {
                switch tag {
                case .ActionSheet0:
                      PlacementAnswer = 0
                case .ActionSheet1:
                      PlacementAnswer = 1

    func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        if segue.identifier == "Saline" {
        else if segue.identifier == "Autre"{


Thats because you are still calling the same (default) viewcontroller within the if blocks. Try something like:

if segue.identifier == "Saline" { let controller = segue.destinationViewController as! SalineViewController //...set your controller } else if segue.identifier == "Autre" { let controller = segue.destinationViewController as! AutreViewController //...set your controller }

Thank you for the tip, actually I tried but it was still the same. meanwhile I remove the function prepareforsegue and I put a new break after IBAction and suddenly it works. thank you again for answering