Comments (6)
+1 Would also like to see this added
from bryxbanner.
Hmm...the didTapBlock should absolutely be doing this. I'll investigate -- this is a promised feature though!
from bryxbanner.
This is how I'm trying to use it now:
let banner = Banner(
title: "\(lastComment!.title) just commented!",
backgroundColor: UIColor.blue()
)
banner.dismissesOnTap = true
banner.springiness = .None
banner.show(duration: 1.5)
banner.didTapBlock?({
print("tapped")
}())
Also tried:
banner.didTapBlock?(test())
func test() -> () {
print("block")
}
from bryxbanner.
Is this coming / being fixed soon? Would really like to use this library but not having this feature makes it not possible for us at the moment.
from bryxbanner.
@ThoseGuysInTown, I successfully detect and act on the user tapping on banner using the following code in swift, I think you need to setup the didtapblock before doing the show:
` // show a thumbs down icon in the banner:
banner = Banner(title: title, subtitle: messageString, image: UIImage(named: "info"), backgroundColor: middleColor)
banner.dismissesOnTap = true
// Setup the did tab on banner block to goto the specified tab:
banner.didTapBlock = {
self.appDelegate.appLog.debug("Banner tapped, going to tab index \(gotoTabIndexOnTap).")
let switchEvent = SwitchToTabIndexEvent(destTabIndex: gotoTabIndexOnTap)
SwiftEventBus.post("SwitchToTabIndexEvent", sender: switchEvent)
}
banner.show(duration: 3.0)
`
from bryxbanner.
Thanks! This works well
from bryxbanner.
Related Issues (20)
- MinimumHeight not work on with Bottom appear HOT 6
- Where is sound of notification? HOT 1
- Xcode 10 and Swift 4.2 HOT 9
- Lack of 'swift_version' in podspec file HOT 4
- Installation via Swift Package Manager
- Multiple Toast show at a Single time HOT 2
- Deployment Target is set to 8.0
- Is there any user data that is either being collected or Tracked by the BRYXBanner
- BRYXBanner/BRYXBanner-Swift.h file not found HOT 1
- CheeriosBanner
- Not respecting top safe area HOT 1
- status bar doesn't restore it's original style when dismissing banner manually HOT 1
- Support for sub views , adding Buttons and actions to the sub views would be great.
- Cannot be used in Objective-C project.
- Setting TextColor makes icon appear black HOT 1
- open url in didTapBlock HOT 1
- swift 4 error HOT 1
- Banner doesn't appears on IOs 11 HOT 4
- Issue when building last version 0.8.0 HOT 1
- iPhone X: bottom banner is overlapping with home indicator HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bryxbanner.