LMDropdownView
LMDropdownView copied to clipboard
Please Update the demo for Swift
We need to refer on swift tutorial on how to implement this drop down view into our project.
@jefferyleo I don't have time. Do it yourself !
Here is how I implemented it in Swift:
var table: UITableView?
var barButton: BBBadgeBarButtonItem?
if self.table == nil {
self.table = UITableView()
self.table!.frame = CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), min(CGRectGetHeight(self.view.bounds)/2, CGFloat(InstanceReferences.userChildren!.count * 44)));
self.table!.dataSource = self
self.table!.delegate = self
self.table!.registerNib(UINib(nibName: "ChildTableViewCell", bundle: NSBundle.mainBundle()), forCellReuseIdentifier: "cell")
self.table!.separatorStyle = .None
self.table!.backgroundColor = UIColor(red: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1.0)
}
if self.drop.isOpen {
self.drop.hide()
}else{
self.table!.reloadData()
self.drop.showInView(self.view!, withContentView: self.table!, atOrigin: CGPoint(x: 0, y: self.navigationController!.navigationBar.frame.size.height + UIApplication.sharedApplication().statusBarFrame.size.height))
}
And here is the output:
for Navigationbar badge I used: https://github.com/TanguyAladenise/BBBadgeBarButtonItem
@OmarBizreh make a pull request....
@OmarBizreh can you please provide the sample swift code/project?