wangmchn / WMPageController-Swift

An easy solution to page controllers like NetEase News.(Swift Implementation)
MIT License
124 stars 25 forks source link

stepping may behave oddly; variables may not be available #12

Open misuqian opened 8 years ago

misuqian commented 8 years ago
public func selectItemAtIndex(index: Int) {
        let tag = index + tagGap
        let currentIndex = selectedItem.tag - tagGap //this line exit break
        guard currentIndex != index && selectedItem != nil else { return }

        let menuItem = viewWithTag(tag) as! MenuItem
        selectedItem.selected = false
        selectedItem = menuItem
        selectedItem.selected = true
        progressView?.moveToPosition(index, animation: false)
        delegate?.menuView?(self, didSelectedIndex: index, fromIndex: currentIndex)
        refreshContentOffset()
    }
wangmchn commented 8 years ago

Hey, @misuqian Can u give more information so I can figure out much more easier? In which situation you got this message? and the log?