Skip to content

Commit

Permalink
Actions share in ReaderTranslatorPlayer #74: Replace UIScreen.main.bo…
Browse files Browse the repository at this point in the history
…unds with GeometryReader.
  • Loading branch information
filimo committed Jan 19, 2020
1 parent 9671610 commit 3040512
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ReaderTranslatorShare/Views/PreviewView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ struct PreviewView: View {
label: { Text("Longman") }).buttonStyle(RoundButtonStyle()
)
}
ZStack {
GTranslatorRepresenter(sentence: store.sentence)
LongmanRepresenter(phrase: store.sentence)
.offset(x: store.viewMode == .longman ? 0 : UIScreen.main.bounds.width)
GeometryReader { geo in
ZStack {
GTranslatorRepresenter(sentence: self.store.sentence)
LongmanRepresenter(phrase: self.store.sentence)
.offset(x: self.store.viewMode == .longman ? 0 : geo.size.width)
}
}
}
.padding(.top)
Expand Down

0 comments on commit 3040512

Please sign in to comment.