Skip to content

Commit 76cea1b

Browse files
author
wuxingchen
committed
update doc
1 parent 9d45696 commit 76cea1b

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

PopupUI-demo/PopupUI-demo/ContentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct ContentView: View {
2929
.onTapGesture {
3030
PopupUI
3131
.show(AnyCustomView())
32-
.from(from) //also .from(.center, .easeIn(duration: 0.3))
32+
.from(from) //also .from(.center, .easeIn(duration: 0.3), scale: 0.5, opacity: 0.5)
3333
.stay(stay)
3434
.to(to)
3535
.background(backgroundColor)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ PopupUI
9393
.isAvoidKeyboard(true) // Whether to avoid the keyboard
9494
.isOpaque(true) // Whether to prevent the user from interacting with the background view
9595
.dismissWhenTapBackground(true) // Whether to hide when the background view is tapped
96+
.scaleFrom(0.5) // show: value -> 1
97+
.scaleTo(0.5) // hide: 1 -> value
98+
.opacityFrom(0.5) // show: value -> 1
99+
.opacityTo(0.5) // hide: 1 -> value
96100
.dismissCallback { id in // The callback when the view is hidden
97101
print("Popup dismissed: \(id)")
98102
}

README_CN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ PopupUI
9191
.isAvoidKeyboard(true) // 是否避开键盘
9292
.isOpaque(true) // 是否可以透过弹窗的背景点击后面的视图
9393
.dismissWhenTapBackground(true) // 点击背景 是否隐藏
94+
.scaleFrom(0.5) // 显示时 value -> 1
95+
.scaleTo(0.5) // 隐藏时 1 -> value
96+
.opacityFrom(0) // 显示时 value -> 1
97+
.opacityTo(0.5) // 隐藏时 1 -> value
9498
.dismissCallback { id in // 隐藏时的回调
9599
print("Popup dismissed: \(id)")
96100
}

README_JP.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ PopupUI
9292
.isAvoidKeyboard(true) // キーボードを避ける
9393
.isOpaque(true) // 背景後のビューとのインタラクションを防ぐ
9494
.dismissWhenTapBackground(true) // 背景をタップして非表示
95+
.scaleFrom(0.5) // 表示時 value -> 1
96+
.scaleTo(0.5) // 非表示時 1 -> value
97+
.opacityFrom(0.5) // 表示時 value -> 1
98+
.opacityTo(0.5) // 非表示時 1 -> value
9599
.dismissCallback { id in // 非表示時のコールバック
96100
print("Popup dismissed: \(id)")
97101
}

0 commit comments

Comments
 (0)