Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f1cb7a

Browse files
authored
Update README.md
1 parent 60b7f93 commit 8f1cb7a

File tree

1 file changed

+53
-24
lines changed

1 file changed

+53
-24
lines changed

README.md

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,17 @@
1414
<p>It is recommended to download AlertViewDemo first, and check the specific usage method.</p>
1515
</font>
1616

17+
# AEAlertView currently offers two basic boxes
18+
1. You can manually set two custom views when using the basic `AEAlertview`<br />
19+
2. With UITextField, `AETextFieldAlertView` can only add one custom view call `set (custom: UIView, width: CGFloat, height: CGFloat)` when in use<br />
20+
3. `AEWebAlertView` with WKWebView is not included in the AEAlertView library due to app auditing issues. You can find it in the demo AEWebAlertView.swift<br />
1721

18-
# Version 2.3 is updated
22+
# Development Plan
23+
add 3D model with Metal to AlertView
1924

25+
# Version update information at the bottom
2026

21-
<font color=#ff6666>
22-
<p>2.3 Updates</p>
23-
<p>Multiple lines of text can be used for buttons, pictures can be set, and pictures can be arranged left and right (Tips: If the height of the button is not set, it will be used uniformly according to the maximum height of the text)</p>
24-
<p>The previous button attribute setting on alertView is abolished, please use `AEAlertAction` directly for button attribute. </p>
25-
<p>Add 'public func create() {}' if you don't need to display on UIWindow you can call 'create()' after configuration to add alert to the view you need to add.
26-
<p>`AEAlertAction` currently only supports 2 display modes `defaulted, cancel`.</p>
27-
<p>All setting properties are done in action. If you don't want to use cancel, you can set all action to defaulted.</p>
28-
</font>
29-
30-
v2.3.2- Support setting the maximum width
31-
v2.3.4- Fix the problem that the title does not wrap lines by default. The number of Title lines can be set use.
32-
v2.3.5- Fix if target init OS > 12, get window error
33-
34-
35-
感谢大家反馈 如果你在使用中遇到任何问题、bug、建议等欢迎提交 [点击进入讨论区](https://github.com/Allen0828/AEAlertView/discussions)
36-
27+
感谢大家反馈 如果你在使用中遇到任何问题、bug、建议等欢迎提交 [点击进入讨论区](https://github.com/Allen0828/AEAlertView/discussions) <br />
3728
Thank you for your feedback. If you encounter any problems, bugs, suggestions, etc. in use, you are welcome to submit them [discussions](https://github.com/Allen0828/AEAlertView/discussions)
3829

3930

@@ -65,7 +56,28 @@ src="https://github.com/Allen0828/AEAlertView/blob/master/img-folder/new7.jpeg"
6556

6657
# 如果有 你有任何问题 或者 好的建议 欢迎联系我 - email: [email protected] -
6758

68-
# 简单使用
59+
# Call method and control description
60+
1. title uses UILabel as the basic control, and can only display two rows by default. If multiple rows need to be displayed, please set the titleNumberOfLines property<br />
61+
62+
2. messages use UITextView as the basic control, and the default display without height will automatically refresh the height based on the content, and it can be selected by long pressing.
63+
Turning off automatic refresh height `alertView.textViewIsScrollEnabled` does not recommend setting this property.<br />
64+
If it is set, please remember to set `messageHeight` Turn off the long press to select mode `messageIsSelectable`<br />
65+
66+
3. Customized View call set for contentView `set(content: UIView, width: CGFloat, height: CGFloat)`
67+
If you want the width of the view to be the same as that of the alert during setup, pass in -1 width when calling
68+
The default upper spacing between contentView and message is 0<br />
69+
70+
4. CustomView custom view2 calls `set (custom: UIView, width: CGFloat, height: CGFloat)`
71+
If you want the width of the view to be the same as that of the alert during setup, pass in -1 width when calling
72+
The default upper spacing between customView and contentView is 0<br />
73+
74+
5. `ActionContainerView` is a control used to place buttons. Currently, this control cannot set its own properties and can only set the spacing between the top and bottom.
75+
The default distance between actionContainerView and customView is 10, which can be set by calling `actionViewTopMargin`
76+
The default distance between actionContainerView and the bottom of alert is 0, which can be set by calling `actionViewBottomMargin`<br />
77+
78+
79+
call demo code<br />
80+
The simplest example of calling method, no matter how many buttons there are, the pop-up window will disappear after clicking the button
6981
```swift
7082
func test() {
7183
AEAlertView.show(title: "title", message: "fastest", actions: ["ok"]) { action in
@@ -78,10 +90,11 @@ func test() {
7890
}
7991
```
8092

81-
# 添加到自定义的view上
93+
If no frame is selected during init when adding to a custom view, it defaults to the same screen size. Therefore, if you want to add to a custom view, you should pass in the frame during initialization
8294
```swift
8395
func test() {
84-
let alert = AEAlertView.init(style: .defaulted, title: "title", message: "set gif height Add alert to the current view")
96+
// frame 使用了当前view的大小 具体请查看demo
97+
let alert = AEAlertView.init(frame: view.bounds, style: .defaulted, title: "title", message: "set gif height Add alert to the current view")
8598
alert.setBackgroundImage(contentsOf: Bundle.main.path(forResource: "003", ofType: "gif"))
8699

87100
alert.backgroundImageHeight = 300
@@ -99,7 +112,7 @@ func test() {
99112
}
100113
```
101114

102-
# 自定义按钮主题
115+
Custom Button Theme Due to the presence of custom buttons in iOS15, if AEAction cannot meet your needs, you can create your own button and add it to alertView
103116
```swift
104117
func test() {
105118
let alert = AEAlertView(style: .defaulted, title: "custom action", message: "Please check the default values before using")
@@ -120,7 +133,8 @@ func test() {
120133
alert.show()
121134
}
122135
```
123-
# 设置最大宽度
136+
137+
Setting the maximum width for the iPad, AlertView will appear larger if you continue to use the screen width for calculation. Therefore, if you use it on the iPad, you should set its maximum width.
124138
```swift
125139
private func alertType3() {
126140
let alert = AEAlertView.init(style: .defaulted, title: "title", message: "set gif height Add alert to the current view", maximumWidth: 600)
@@ -141,8 +155,23 @@ private func alertType3() {
141155
}
142156
```
143157

144-
-------------------
145-
*** 控件支持 设置左右 上下间距 本来想提供 类方法来一句话调用, 但是每个项目的主题色不同 所有需要你 自己设置自己的主题色***
158+
# Version Updated Record
159+
v2.3.6-<br />
160+
1: If alertView is set to custom style, action will add stroke and rounded corners by default. Setting action.adapterCustom can be canceled<br />
161+
2: The added content can be set as unselectable. The default is selectable, messageIsSelectable<br />
162+
3: When alertView is initialized, an optional parameter of frame is added. If you need to add alert to a custom view, it is best to pass in a custom size. If not, use the default screen width and height<br />
163+
4: When setting a custom View, the width can be consistent with the width of the parent container, and the width can be read by -1<br />
164+
5: Added some debug log printing<br />
165+
166+
v2.3.5-<br />
167+
Fix the error of getting window if target init OS>12<br />
168+
169+
v2.3.4-<br />
170+
Fixed title not wrapping by default. The number of added title lines can be set.
171+
172+
v2.3.2-<br />
173+
Support setting the maximum width
174+
146175

147176

148177

0 commit comments

Comments
 (0)