Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
Map scroll directions to actual segment indices in fonts menu (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianyh authored and hebertialmeida committed May 29, 2017
1 parent 6eb8e24 commit 419d5e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/FolioReaderFontsMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ class FolioReaderFontsMenu: UIViewController, SMSegmentViewDelegate, UIGestureRe
scrollDirection = readerConfig.scrollDirection
}

layoutDirection.selectSegmentAtIndex(scrollDirection?.rawValue ?? 0)
switch scrollDirection ?? .vertical {
case .vertical, .defaultVertical:
layoutDirection.selectSegmentAtIndex(FolioReaderScrollDirection.vertical.rawValue)
case .horizontal, .horizontalWithVerticalContent:
layoutDirection.selectSegmentAtIndex(FolioReaderScrollDirection.horizontal.rawValue)
}
menuView.addSubview(layoutDirection)
}

Expand Down

0 comments on commit 419d5e8

Please sign in to comment.