Comments (2)
//notification.notificationDelegate = self
notification.titleText = "Update available";
notification.subtitleText = "Do you want to download the update of this file?";
notification.topButtonText = "Accept";
notification.bottomButtonText = "Cancel";
notification.dismissOnTap = true;
notification.image = UIImage(named: "mainLogo")
notification.presentInView(self.view, withGravityAnimation: true)
NSLog(notification.description)
notification.listenEventsWithBlock({ (event : AFDropdownNotificationEvent) -> Void in
switch (event) {
case AFDropdownNotificationEvent.TopButton:
// Top button
break;
case AFDropdownNotificationEvent.BottomButton:
// Bottom button
break;
case AFDropdownNotificationEvent.Tap:
// Tap
break;
default:
break;
}
})
this is working fine i had tested on ios 9.1 swift 2.0 xcode 7.1 if this works for you than please close issue.
from afdropdownnotification.
im not clear how this got resolved?
is it the notificationDelegate is nil and using listenEventsWithBlock instead ?
from afdropdownnotification.
Related Issues (19)
- Please fix the warning HOT 1
- Didn't work for me HOT 4
- Replace delegate with blocks HOT 3
- "Multiple gravity behavior per animator is undefined and may assert in the future"
- Support for ActivityView? HOT 1
- Add option to show a banner with an input field
- Swipe to dismiss
- Method presentInView:(UIView *)view ....
- swift 2.0 Version
- change text color
- Use without status bar HOT 1
- Notification gone when click on any option in Action sheet HOT 1
- Doesn't support rotation
- Add higlighted state for the buttons
- trouble dismissing & presentInView function doesn't seem to do anything with the view arg HOT 1
- Text on right if there is no image
- notificationDelegate is declared as a strong reference property which causes the delegate to not be deallocated
- 2 or more notifications cause a bug
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 afdropdownnotification.