Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxingchen committed Mar 18, 2024
1 parent 9d45696 commit 76cea1b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PopupUI-demo/PopupUI-demo/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct ContentView: View {
.onTapGesture {
PopupUI
.show(AnyCustomView())
.from(from) //also .from(.center, .easeIn(duration: 0.3))
.from(from) //also .from(.center, .easeIn(duration: 0.3), scale: 0.5, opacity: 0.5)
.stay(stay)
.to(to)
.background(backgroundColor)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ PopupUI
.isAvoidKeyboard(true) // Whether to avoid the keyboard
.isOpaque(true) // Whether to prevent the user from interacting with the background view
.dismissWhenTapBackground(true) // Whether to hide when the background view is tapped
.scaleFrom(0.5) // show: value -> 1
.scaleTo(0.5) // hide: 1 -> value
.opacityFrom(0.5) // show: value -> 1
.opacityTo(0.5) // hide: 1 -> value
.dismissCallback { id in // The callback when the view is hidden
print("Popup dismissed: \(id)")
}
Expand Down
4 changes: 4 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ PopupUI
.isAvoidKeyboard(true) // 是否避开键盘
.isOpaque(true) // 是否可以透过弹窗的背景点击后面的视图
.dismissWhenTapBackground(true) // 点击背景 是否隐藏
.scaleFrom(0.5) // 显示时 value -> 1
.scaleTo(0.5) // 隐藏时 1 -> value
.opacityFrom(0) // 显示时 value -> 1
.opacityTo(0.5) // 隐藏时 1 -> value
.dismissCallback { id in // 隐藏时的回调
print("Popup dismissed: \(id)")
}
Expand Down
4 changes: 4 additions & 0 deletions README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ PopupUI
.isAvoidKeyboard(true) // キーボードを避ける
.isOpaque(true) // 背景後のビューとのインタラクションを防ぐ
.dismissWhenTapBackground(true) // 背景をタップして非表示
.scaleFrom(0.5) // 表示時 value -> 1
.scaleTo(0.5) // 非表示時 1 -> value
.opacityFrom(0.5) // 表示時 value -> 1
.opacityTo(0.5) // 非表示時 1 -> value
.dismissCallback { id in // 非表示時のコールバック
print("Popup dismissed: \(id)")
}
Expand Down

0 comments on commit 76cea1b

Please sign in to comment.