Azuritul / AZDropdownMenu

A simple dropdown menu component for iPhone
http://azuritul.github.io/AZDropdownMenu
MIT License
193 stars 50 forks source link

Set a Row Selected. #26

Open iAviatorJose opened 8 years ago

iAviatorJose commented 8 years ago

thank you for this open Source POD. Great Job.

Is there any way i can set a menu already selected. I tried adding this code in your AZDropdownMenu, but of no use.

public var selectedposition : Int = 0{

        didSet {
            let indexPath = NSIndexPath.init(forRow: selectedposition, inSection: 0)
            self.menuView.selectRowAtIndexPath(indexPath, animated: true, scrollPosition: UITableViewScrollPosition.None)
            self.menuView.reloadData()
        }

    }
koust commented 6 years ago

did you solve problem ?