You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53-24Lines changed: 53 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,26 +14,17 @@
14
14
<p>It is recommended to download AlertViewDemo first, and check the specific usage method.</p>
15
15
</font>
16
16
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 />
17
21
18
-
# Version 2.3 is updated
22
+
# Development Plan
23
+
add 3D model with Metal to AlertView
19
24
25
+
# Version update information at the bottom
20
26
21
-
<fontcolor=#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
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)
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 />
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
69
81
```swift
70
82
functest() {
71
83
AEAlertView.show(title: "title", message: "fastest", actions: ["ok"]) { action in
@@ -78,10 +90,11 @@ func test() {
78
90
}
79
91
```
80
92
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
82
94
```swift
83
95
functest() {
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")
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
103
116
```swift
104
117
functest() {
105
118
let alert =AEAlertView(style: .defaulted, title: "custom action", message: "Please check the default values before using")
@@ -120,7 +133,8 @@ func test() {
120
133
alert.show()
121
134
}
122
135
```
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.
124
138
```swift
125
139
privatefuncalertType3() {
126
140
let alert = AEAlertView.init(style: .defaulted, title: "title", message: "set gif height Add alert to the current view", maximumWidth: 600)
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.
0 commit comments