Issue in Swift
Closed this issue · 4 comments
bhautikpatoliya commented
I was added all three methods in my swift view controller
func numberOfItemsInHorizontalSelection(hSelView: EHHorizontalSelectionView) -> UInt {
}
func titleForItemAtIndex(index: Int, forHorisontalSelection hSelView: EHHorizontalSelectionView) -> String? {
}
func horizontalSelection(hSelView: EHHorizontalSelectionView, didSelectObjectAtIndex index: UInt) {
}
getting error for protocol does not confirmed.
please help me.
Thanks.
josshad commented
Hello
func numberOfItemsInHorizontalSelection(hSelView: EHHorizontalSelectionView) -> UInt {
return 0;
}
func titleForItemAtIndex(index: UInt, forHorisontalSelection hSelView: EHHorizontalSelectionView) -> String? {
return "";
}
func horizontalSelection(hSelView: EHHorizontalSelectionView, didSelectObjectAtIndex index: UInt) {
}
With these methods my project succesfully compiles.
bhautikpatoliya commented
I am compiled project in xCode 8. and got this error.
josshad commented
Xcode 8 suggests this syntax
func numberOfItems(inHorizontalSelection hSelView: EHHorizontalSelectionView) -> UInt {
return 0;
}
func titleForItem(at index: UInt, forHorisontalSelection hSelView: EHHorizontalSelectionView) -> String? {
return "";
}
func horizontalSelection(_ hSelView: EHHorizontalSelectionView, didSelectObjectAt index: UInt) {
}
bhautikpatoliya commented
Thank you @joashad
It's working for me.
Thanks again.