Releases: VladK9/UIFloatMenu
Releases · VladK9/UIFloatMenu
Fixes previous update
1.0.7 New transition animation, Activity indicator, TextView row and new custom view
- New queue transition animation
- Loading with Activity indicator (set closeOnTap to false)
.init(item: .ActionCell(selection: .default(icon: UIImage(systemName: "lineweight")!, title: "Indicator")), closeOnTap: false, action: { _ in
UIFloatMenu.displayIndicator(presentation: .rightUp(overNavBar: true))
//If success, show next
let header = UIFloatMenuHeaderConfig(title: "Indicator", showLine: true)
UIFloatMenu.showNext(actions: custom_actions, presentation: .rightUp(overNavBar: true), header: header)
// If error, stop indicator and show previous view
UIFloatMenu.stopIndicator()
})
- TextFieldCell renamed to InputCell and added TextView type
.InputCell(type: .textView(), placeholder: "Login", isResponded: true, identifier: "Login")
.InputCell(type: .textField(), placeholder: "Description", isResponded: true, identifier: "Description")
-
Show custom view
From cell (set closeOnTap to false)
.init(item: .ActionCell(selection: .default(icon: UIImage(systemName: "slider.horizontal.2.gobackward")!, title: "Show custom view")), closeOnTap: false, action: { _ in let header = UIFloatMenuHeaderConfig(title: "Custom view", showLine: true) let custom = UIFloatMenuCustomView(source: self, text: "Test title") UIFloatMenu.showNext(type: .custom(view: custom), header: header, presentation: .default) })
Init
let select = UIFloatMenuCustomView(source: self, text: "Test title") let custom_menu = UIFloatMenu.setup(type: .custom(view: select))
Fixes
Double actions, Queue, Custom cells, TextField row with ID
- Added double action items
.init(item: .ActionCell(selection: .multi(isSelected: true,
selectedIcon: UIImage(systemName: "star.slash"), selectedTitle: "Unstar",
defaultIcon: UIImage(systemName: "star"), defaultTitle: "Star")),
action: { action in
if action.isSelected ?? false {
print("item Unstar")
} else {
print("item Star")
}
}),
- Add queue (visual settings taken from initial view)
let header = UIFloatMenuHeaderConfig(title: "Activity", showLine: true)
UIFloatMenu.showNext(actions: style_actions, presentation: .center, header: header)
- Added custom view cell
.init(item: .CustomCell(view: CustomViewRow(title: "Custom rows", subtitle: "View custom rows", icon: UIImage(systemName: "tablecells")!)), action: { _ in
})
- Find specific TextField row by identifier
// Setup cell
.init(item: .TextFieldCell(placeholder: "Login", identifier: "Login"))
// Delegate
func UIFloatMenuGetTextFieldData(_ rows: [TextFieldRow]) {
let login = UIFloatMenuHelper.find(rows, by: "Login")
let password = UIFloatMenuHelper.find(rows, by: "Password")
print("Login -", login)
print("Password -", password)
}
- Show alert
let alert = UIAlertController(title: "Delete", message: "message", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel))
UIFloatMenuHelper.showAlert(alert)
- Fixed action completion after tap
Horizontal cell
Scroll down to close and Fixes
- Added Big item height
- Scroll down to close
- Fixed iPhone rotation bug