Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

How to make Selected item Should be highlited #88

Open
NallapatiMalleswari opened this issue Nov 2, 2017 · 0 comments
Open

How to make Selected item Should be highlited #88

NallapatiMalleswari opened this issue Nov 2, 2017 · 0 comments

Comments

@NallapatiMalleswari
Copy link

NallapatiMalleswari commented Nov 2, 2017

I am trying to change viewcontrollers using pickerview,But the selected item is not highlited while Changing viewcontrollers.This is my code ,Help me

func pickerView(_ pickerView: AKPickerView, didSelectItem item: Int) {
currentScrollIndex = item
print("currentScrollIndexSTEPS(currentScrollIndex)")
if item == 0{
let caloriesVC = self.storyboard?.instantiateViewController(withIdentifier: "CaloriesViewController")as! CaloriesViewController
caloriesVC.modalTransitionStyle = .crossDissolve
present(caloriesVC, animated: true, completion: nil)
}
else if item == 1{
let goalsVC = self.storyboard?.instantiateViewController(withIdentifier: "GoalsViewController")as! GoalsViewController
goalsVC.modalTransitionStyle = .crossDissolve
present(goalsVC, animated: true, completion: nil)
}
else if item == 2{
let oxigenVC = self.storyboard?.instantiateViewController(withIdentifier: "O2ViewController")as! O2ViewController
oxigenVC.modalTransitionStyle = .crossDissolve
present(oxigenVC, animated: true, completion: nil)
}

    preBtn.isHidden = (item == 0) ? true : false
    nextBtn.isHidden = (item == pickerViewItems.count - 1) ? true : false
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant