-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please Update the demo for Swift #10
Comments
@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? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to refer on swift tutorial on how to implement this drop down view into our project.
The text was updated successfully, but these errors were encountered: