onmyway133 / easydropdown Goto Github PK
View Code? Open in Web Editor NEW:droplet: Fantastic dropdown in Swift
Home Page: https://onmyway133.com
License: Other
:droplet: Fantastic dropdown in Swift
Home Page: https://onmyway133.com
License: Other
When I try to compile it and integrate it with Swift 4.1, I cannot import this module, since it was compiled with Swift 4.0.3.
The source you wrote is very useful to me
But, i have a question.
How can i set selected menu in programmatically?
Does the POD name change?
Hi, is there a way to detect if the dropdown menu is currently showing? (after the arrow button is pressed and before the selection is made).
Thanks,
Can't seem to find the podfile
Hi There,
When I enter in background mode my app crashes due memory leak. I Comment the following code:
let titleView = TitleView(navigationController: nav, title: company.company_name, items: companies)
titleView?.button.label.textColor = .white
titleView?.button.arrow.image = titleView?.button.arrow.image?.withRenderingMode(.alwaysTemplate)
titleView?.button.arrow.tintColor = .white
titleView?.action = { [weak self] index in
print("select \(index)")
let company_name = companies[index]
let company = user.companies.filter({ $0.company_name == company_name }).first
self?.selectedCompany = company
titleView?.button.label.textColor = .white
titleView?.button.arrow.image = titleView?.button.arrow.image?.withRenderingMode(.alwaysTemplate)
titleView?.button.arrow.tintColor = .white
AppSessionManager.shared.retrieveProducts = false
AppSessionManager.shared.retrieveOrders = false
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "companyChange"), object: nil)
}
navigationItem.titleView = titleView
Now my app does not have memory leaks. What could be happening?
Best regards
This project isn't compatible with Swift 4 / XCode 9 Release.
I'm developing an app using Dropdowns the app works fine on my iOS version 11.4, but when i try on a device on version 10.3 the app gets lock i don't know why.
the scenery is this:
I have two options in my dropdown, when i check the second one (Ranking popularidad) the tableview reloads great and shows the information and you can scroll down and scroll up, then I do click on a cell and show the profile of the place, then when i get back clicking on the link Atrás the application get lock, any help
let titleView = TitleView ( navigationController: navigationController!, title: "", items: items, defaultIndex: 0)
`open class TitleView: UIView {
open var dropdown: DropdownController!
open var button: ArrowButton!
open var action: ((Int) -> Void)?
// MARK: - Initialization
public init?(navigationController: UINavigationController, title: String, items: [String], defaultIndex: Int) {
super.init(frame: CGRect.zero)
// Button
button = ArrowButton()
button.label.text = title
button.label.text = items[defaultIndex]
button.addTarget(self, action: #selector(buttonTouched(_:)), for: .touchUpInside)
addSubview(button)
self.layoutSubviews()
// Content
let contentController = TableController(items: items, initialIndex: defaultIndex )
// Dropdown
guard let dropdown = DropdownController(contentController: contentController, navigationController: navigationController)
else { return nil }
self.dropdown = dropdown
contentController.action = { [weak self, weak dropdown] index in
self?.button.label.text = items[index]
self?.action?(index)
self?.layoutSubviews()
dropdown?.hide()
}
contentController.dismiss = { [weak dropdown] in
dropdown?.hide()
}
dropdown.animationBlock = { [weak self] showing in
self?.button.arrow.transform = showing
? CGAffineTransform(rotationAngle: CGFloat.pi) : CGAffineTransform.identity
}
}
public required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
open override func layoutSubviews() {
super.layoutSubviews()
button.label.sizeToFit()
button.frame.size.height = 44
button.sizeToFit()
frame.size = button.frame.size
}
// MARK: - Action
@objc func buttonTouched(_ button: ArrowButton) {
dropdown.toggle()
}
}
`
So. I integrated Dropdowns into my project and it worked fine until I started to work on landscape orientations. Every time I try to change orientation of simulator or even real device - app freezes forever and takes 100% cpu. Was hard for me to detect what part of app does actually crash it, but after all I found that without Dropdowns app doesn't show that bug
Hey, I would like to have the possibility to change the default arrow image in the title via Config. #
Does this support swift 4.2?
let titleView = TitleView(navigationController: navigationController!, title: "Menu", items: ["World", "Sports", "Culture", "Business", "Travel","jawad"]) here why ?
Fatal error: Unexpectedly found nil while unwrapping an Optional value
hi, i am trying to change the color of the view that is behind the tableview that is now set to some sort of green (the view that u see when u scroll down). is there a way to do that?
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.