rushisangani / rsselectionmenu Goto Github PK
View Code? Open in Web Editor NEWAn elegant selection list or dropdown menu for iOS with single or multiple selections.
License: MIT License
An elegant selection list or dropdown menu for iOS with single or multiple selections.
License: MIT License
It takes a long time to open the selection menu, and also, when selecting items, it takes a little for the check to appear
I was using RSSelectionMenu with Formsheet style fine with version 5.0, after updating to 5.1.1 Formsheet height goes to the bottom of the screen.
New Actionsheet and Alert styles work ok.
Hi there,
nice plugin. How could I change the color of the checkmark ?
Hi
I'm getting error Error:(78, 33) 'automaticDimension' has been renamed to 'UITableViewAutomaticDimension'
while compiling my app after I updated to 5.3
Can you please look into it?
Hello
Thanks for this awesome lib. Works great. Anyways, I was wondering if you could allow showing a simple title at the top of the selection menu when its style is .Formsheet
, basically above the search bar (if it's enabled) or where the search bar would be
Thanks in advance ๐๐๐ผ
Hi,
I found another bug while using the first row select all option.
If you create a formsheet with a first row as a select all option.
The onDismiss callback does not fire.
Thanks again for this amazing pod. :)
Hello
any way to add serach bar in Navigation bar ?
Formsheet appears only one time, If the tap anywhere else or make a selection and then try to show the Formsheet it shows nothing.
Thank for library.
How to set item default selected in single selection?
Hi, I'm using your plugin as a popover selection list.
Currently I'm loading the items from the CoreData so I extended the class I needed to get an identifier as specified in the documentation
extension CategoriesCoreData: UniqueProperty {
public func uniquePropertyName() -> String {
return "title"
}
}
The title is for sure unique because before adding a new category the software checks if that title already exists
When I tap, in this case a category, they show all as selected UI only, with this I mean, on the UI appears that all have been selected but on the code only one was selected as it should.
first i want to thanks for your very good support
thanks to add function to add title but very little thing still has problem for me
when i add search button i can change the placeholder of search that is awesome but there is a
cancell buttun with text "Cancell" its whould be nice if you can add this function to
by the way you are so cool man !!!
How can I detect an event after an item is selected?
Thanks
Hi
Awesome work with RSSelectionMenu. Makes creating of drop down easier, manageable, and cool. Though I am encountering an issue when I try to use onDismiss. Swift shows an error that the menu has no member 'onDismiss'. Is there some import or configuration I am missing?
Thanks
I would like to show a UILabel with a message when the datasource is empty to handle empty tableView. How is it possible here?
Hi,
I have a list of products with single selection. If the user regret of the product I can't diss select. How can you do that.
Hi,
Again I am loving this pod. Thanks for keeping it well maintained!!
I think I found a bug today.
If you add a first row with type .All. In the callback to setSelectedItem. The selected items array is returning with zero items.
It would make sense to me if there is a select all option available the setSelectedItem closure should return an array of all the items.
If this is not a bug and it is the intentional behaviour I am sorry. I just thought I would raise it with you.
Thanks.
Hi,
I'm using custom model with custom cell
This is the class "bank" :
class bank: NSObject, UniqueProperty {
let banknm:String
init(banknm:String) {
self.banknm = banknm
}
// Here id has the unique value for each person
func uniquePropertyName() -> String {
return "banknm"
}
}
And this the function I'm calling on Button Click.
func displayBank() {
let selectionMenu = RSSelectionMenu(selectionType: .Single, dataSource: bankDataArray, cellType: .Custom(nibName: "CustomTableViewCell", cellIdentifier: "customCell")) { (cell, bank, indexPath) in
let customCell = cell as! CustomTableViewCell
let rec = self.bankDataArray[indexPath.item]
customCell.lbl.text = rec.banknm
}
selectionMenu.setSelectedItems(items: selbankDataArray) { (text, selected, selectedItems) in
self.selbankDataArray = selectedItems
self.btnBank.setTitle(self.selbankDataArray.first?.banknm, for: .normal)
}
if(bankDataArray.isEmpty) {
selectionMenu.addFirstRowAs(rowType: .Custom(value: "No Banks Found"), showSelected: self.firstRowSelected) { (text, isSelected) in
// update your flag here to maintain consistency. - This is required to be update when presenting for the second time.
self.firstRowSelected = isSelected
}
}
selectionMenu.showSearchBar { (searchtext) -> ([bank]) in
return self.bankDataArray.filter({$0.banknm.lowercased().hasPrefix(searchtext.lowercased())
})
}
selectionMenu.show(from: self)
}
Now when I type to filter the list, It's not returning the right ones
Here's the screen recording...
https://drive.google.com/open?id=1JCWdYm4NI9nuf8q3wvD3zaw4x3btFZYq
ERROR ITMS-90087: "Unsupported Architectures. The executable for Test.app/Frameworks/RSSelectionMenu.framework contains unsupported architectures '[x86_64, i386]'."
I change in swift 4:
Go to pods projects in your workspace.
Select RSSelectionMenu target.
Go to Build Settings and set Swift Language Version to 3.2
But " Cannot assign value of type '[String : Any]?' to type '[NSAttributedStringKey : Any]?' "
i want to user your library in my language and i should change the text button
If I select an item how can I know the index that I select, in the selectionMenu.setSelectedItems(items: [])
thanks
Hey
This pod is so so good and such a pleasure to use. Thanks for making and sharing it!
I have a feature request. Would it be possible to add an on dismiss callback closure which would be triggered when the formsheet style gets dismissed.
Thanks!
Hi,
I want to disable checking the default checked cell so that user cannot uncheck them.
How can I do that please?
Thank you
Hi folks
Is there a way to show "Popover" with a NavigationBar or at least a custom Title?
I saw the screenshot in this ticket: #51
This would be exactly what I need.
Bests
Philippe
What is my problem? - It's works perfect but when I select one row, the App shows me "one row selected... etc" and it's okay, but when im looking into an App I have "checked" every rows.
there is my code:
@IBAction func licenseSelection(_ sender: Any) {
let context = licenseSavingController.persistentContainer.viewContext
let request = NSFetchRequest<NSFetchRequestResult>(entityName: "Licencja")
let selectionMenu = RSSelectionMenu(selectionType: .Single, dataSource: licencje, cellType: .Basic) { (cell, object, indexPath) in
cell.tintColor = .orange
request.returnsObjectsAsFaults = false
do {
var result = try context.fetch(request) as! [NSManagedObject]
result = [result[indexPath.row]]
for data in result {
self.licznik = self.licznik+1
cell.textLabel?.text = data.value(forKey: "licenseDescript") as? String ?? data.value(forKey: "licenseURL") as? String
//forKey: "licenseURL") as? String ?? "default"
//forKey: "licenseNumber") as? String ?? "default"
//data.value(forKey: "deviceID") as? String ?? "default"
}
} catch {
print("Failed")
}
}
selectionMenu.uniquePropertyName = "licznik"
selectionMenu.setSelectedItems(items: wybranaLicencja) { (text, isSelected, selectedItems) in
self.wybranaLicencja = selectedItems
print(selectedItems)
}
selectionMenu.show(style: .Popover(sourceView: sender as! UIView, size: nil), from: self)
}
like that: https://imgur.com/nveTKJ8 Im really confused with this :P
Where can i access the array of the selected items after dismissing the menu ?
On Single selection type, when you select an item on the list, all item on the list displays a checkmark.
Building project takes too long time when adding the pod of RSSelectionMenu
Thanks for the great library.
How to get the id of the selected cell in formsheet?
The dataSource is a dictionary of key, value pairs. On cell selection how to capture the Id ?
Any help?
Thanks.
Hi, I've recently added your lib to my project but I'm getting this error
Cannot assign value of type '[String : Any]?' to type '[NSAttributedStringKey : Any]?'
This error can be found in the file RSSelectionMenuController.swift line 325 witch contains this function
// navigation bar
fileprivate func setNavigationBarTheme(_ theme: NavigationBarTheme) {
if let navigationBar = self.navigationController?.navigationBar {
navigationBar.barTintColor = theme.color
if theme.color != nil {
navigationBar.tintColor = UIColor.white
}
navigationItem.title = theme.title
navigationBar.titleTextAttributes = theme.attributes // <- Line where the error is located (325)
}
}
i don't know why in new update my buttons (navigations button and search cancel button ) not showing up at all
in my code i setup
selectionMenu.rightBarButtonTitle = "Submit"
selectionMenu.leftBarButtonTitle = "Close"
and for my search i setup
selectionMenu.searchBarCancelButtonAttributes = SearchBarCancelButtonAttributes("Dismiss", .red)
and i want to customize search placeholder alignment in my case its stick on right but my language is RTL
thank you for your support
Thanks for such a great library, Can you please make the search bar as sticky on top while scrolling, it will possible by adding searchbar in tableview delegate , 'tableView(_ tableView: UITableView,
viewForHeaderInSection section: Int) -> UIView?' instead of 'tableHeaderView',
Thanks for great work ๐ฏ ๐
Hi,
this is a really great swift module!
Is it possible to have a button e.g. on the left navbar for clearing the selection?
Thanks
Phil
when i added pod 'RSSelectionMenu'
into my podfile i got following message in terminal
Installing RSSelectionMenu (3.3)
which means it is installing 3.3
and when i addedd pod 'RSSelectionMenu', '~> 5.2.1'
into podfile i got following message in terminal
CocoaPods could not find compatible versions for pod "RSSelectionMenu":
In Podfile:
RSSelectionMenu (~> 5.2.1)
None of your spec sources contain a spec satisfying the dependency: `RSSelectionMenu (~> 5.2.1)`.
Please define which is correct version to install.
I want to use .Multiple
and .Present
at the same time. I do not want the "Done" button but a cancel button on the left. Anyways, the library keeps overriding my custom configuration.
Please give us full control of the NavigationBar
buttons in any of the styles.
Basically, disable these checks, please.
Thanks
tableview height should calculate dynamic if I have just 2 row your library create table view with lots of empty white space
I installed the zip on IOS 9.0 and all seemed fine. Is there a reason the deployment target in the podfile is 10.0? Thanks!
How to pass data through api return. For eg: With every searchText i call an api which return data array and then it refreshes the selection menu. When i try to add the api inside the return function. It shows an error that closure require a return. It is not considering the return from the closure as a return.
For eg:
selectionMenu.showSearchBar(withPlaceHolder: "Search Player", tintColor: UIColor.white.withAlphaComponent(0.3)) { (searchText) -> ([SearchModel]) in
let parameters = ["term": searchText]
ThreadStore.shared.search(parameters: parameters) {(success, list) in
return list as! [SearchModel] . //(Returning the response from the web service)
}
}
I am using formsheet to present users list which works fine but some time the width of formsheet shrink check the following image.
screen shot
It happens only some time other time the width is fine but i am unable to find why this is happening.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.