macfeteria / jknotificationpanel Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
this looks like the best library available.
(Although looking to integrate this into an existing project - it's a shame you don't support a title + message.)
โ Example pod install
[!] Invalid Podfile
file: [!] Unsupported options {:exclusive=>true}
for target JKNotificationPanel-iPhone
..
target 'JKNotificationPanel-iPhone', :exclusive => true do
pod "JKNotificationPanel", :path => "../"
-------------------------------------------
Hi again,
sorry to bother you again and again. I am trying to use this productive, so I stumble about some issues during testing.
When using JKNotificationPanel with a long text (as in the demo), the text is cut off when being using in a UISplitViewController's DetailView:
Should be "Offline Mode: Detailed product information, images and datasheets are not available when offline."
Edit: Rotation height is broken too, when used in a UISplitVC. After rotation the Panel is cut of at the top (a few pixels).
How to reproduce:
Create UISplitViewController from Xcode project templates, add JKNotification Panel to Detail View. Try to show a long text and/or rotate. Best seen when setting .AllVisible
property of SplitView (splitViewController.preferredDisplayMode = UISplitViewControllerDisplayMode.AllVisible
), so the Master View does not hide when shown portrait on iPad.
Any idea?
Looks great, thanks for publishing!
Two bugs I noticed when trying the demo:
Basic resizing should be easy to implement using autoResizingMask [.FlexibleWidth, .FlexibleHeight] for the bannerView and Label with translatesAutoresizingMaskIntoConstraints = true. Regarding the position, looks like a constraints to topLayout is needed.. UINavigationBar usually resizes upon rotation.
Cheers,
Frederik
hello can you please support carthage as well thanks
Could you add the possibility to add a selector or send a notification when the panel was touched? I would like to show the panel if the app found a problem and the user should be put to the screen where he can solve the problem when he taps the panel.
I'd like to show the notification at bottom.
Something like:
public func showBottomNotify(withStatus status: JKType, inView view: UIView, message text:String? = nil) {
let panelSize = CGSize(width: view.frame.size.width, height: defaultViewHeight)
let defaultView = self.defaultView(status,message: text,size: panelSize)
verticalSpace = UIScreen.mainScreen().bounds.size.height - defaultView.frame.size.height
self.showNotify(withView: defaultView, inView: view)
}
Two last small things:
Shouldn't Tab
be named Tap
? Guess that's a typo (and even if changing it breaks the Api, this is easy to fix for previous users).. You used that name in the Handlers, Actions, Protocol etc.
And the other thing: Is there a way to get some kind of fadeOut Animation when tapping the panel to dismiss? Probably something like the automatic fadeOut?
Edit: Not very DRY but using your code from animateFade() in dismissNotify() too should do the trick.
public func dismissNotify() {
if let view = self.view {
var frame = self.view.frame
frame.size.height = -10
let fade = {
self.view.alpha = 0
self.view.frame = frame
}
let fadeComplete = { (success:Bool) -> Void in
view.removeGestureRecognizer(self.tapGesture )
view.removeFromSuperview()
self.view = nil
self.withView = nil
if let delegate = self.delegate {
delegate.notificationPanelDidDismiss()
} else if let userDismissAction = self.dismissAction {
userDismissAction()
}
}
UIView.animateWithDuration(0.2, animations: fade, completion: fadeComplete)
}
}
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.