Giter Club home page Giter Club logo

calimarkus / jdstatusbarnotification Goto Github PK

View Code? Open in Web Editor NEW
4.1K 111.0 548.0 2.81 MB

Highly customizable & feature rich notifications. Interactive dismiss. Custom Views. SwiftUI. Tap-to-hold. Progress. Written in Swift, compatible for ObjC!

Home Page: http://calimarkus.github.io/JDStatusBarNotification/documentation/jdstatusbarnotification

License: MIT License

Objective-C 7.23% Ruby 0.84% Swift 91.93%
banner ios toast toast-notifications notification alert bubble pill tooltip activity

jdstatusbarnotification's Introduction

jdstatusbarnotification's People

Contributors

alphatroya avatar calimarkus avatar codeblooded avatar danylokos avatar dean151 avatar finestructure avatar iwasrobbed avatar k06a avatar kaspik avatar kevingibbon avatar kwigginton avatar mattinasi avatar nicorichard avatar podkovyrin avatar pronebird avatar readmecritic avatar ricardopereira avatar robertbiehl avatar vfuc avatar zhuli8com avatar zskamljic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jdstatusbarnotification's Issues

Orientation bug

(iOS8) When status bar notification is showing, you rotate device orientation, its frame is not right.

When view controller first loads, the status bar notification is not visible

Hi,

As soon as my application loads, I need to go fetch data. At this point, I want to show the JDStatusBarNotification to indicate to the user that something is loading. However, the first time the application loads, the status bar notification isn't loading. every other time after that it works fine!

Varun

Not working

Hi Jaydee,

I am following instructions, but the notification bar isn't showing up.

I am calling it as follows: [JDStatusBarNotification showWithStatus:@"Loading" dismissAfter:5.0f styleName:JDStatusBarStyleDark]; after importing the folder & including.h in my view controller I still can't see it.

I am using iOS 7. Do you know whats wrong?

Thanks,
Varun

about the overlaywindow

i'm wonder the overlaywindow

what 's it's superview?

i try to po it but it's null

is overlaywindow equal application.keywindow?

PS:

after i read the code

i just find you creat the overlaywindow

but i can't find where you display it

please help

topBar frame is (0,0,0,0) after device rotation.

I'm experiencing something that looks like a bug. After showing a notification (and after it dismisses), if I rotate the device and try to trigger another notification nothing happens for a few seconds (up to 30). Then, after a few seconds, the notifications start working again.

Upon looking in the code, the self.topBar on line 248 of the JDStatusBarNotification.m (inside the showWithStatus: style: method) file has a frame of (0,0,0,0). Any thoughts on what might be causing this?

I see that Issue #35 had some similarities to this bug, but it was while the notification was showing. This is happening when rotation happens with no notifications visible.

iOS 8 and 9.

Thanks.

Issue #24 Still an issue

That issue is closed, so I am creating a new issue. It appears to be the same as #24, except that the fix for #24 is already in place. So there must be something else going on.

Sample from the crash log:
505 UIKit 0x0000000186ae9c9c -[UIApplicationRotationFollowingController supportedInterfaceOrientations] + 104
506 OurAppName 0x000000010049c340 -JDStatusBarNotificationViewController supportedInterfaceOrientations
507 UIKit 0x000000018688487c -[UIViewController __supportedInterfaceOrientations] + 700

These lines are repeated over an over (not the number on the left in the 500s)

Activity indicator is misplaced after rotation

If you showActivityIndicator:: and then rotate the device, the activity indicator doesn't move to the correct location, but has the x-position of the initial orientation. I've modded the sources to show my recording indicator instead of activity indicator, but you get the point:
screen shot 2013-12-03 at 09 44 49

Recursive Crash on iOS 8.3

We are getting a recursive crash when JDStatusBarNotification usage is close in time to a UIAlertView being presented. This reproduces in the 8.3 simulator with Xcode 6.3.

It appears the window is calling supportedInterfaceOrientations on JDStatusBarNotificationViewController, and it is then asking the window the same.

The crash logs truncate the early part of the call stack, but from the Xcode stacks:
....
#130769 0x0000000102a1e59a in -[JDStatusBarNotificationViewController supportedInterfaceOrientations]
#130770 0x00000001053d2569 in -_UIAlertShimPresentingViewController supportedInterfaceOrientations
#130771 0x0000000102a1e59a in -[JDStatusBarNotificationViewController supportedInterfaceOrientations]
#130772 0x00000001053d2569 in -_UIAlertShimPresentingViewController supportedInterfaceOrientations
#130773 0x0000000102a1e59a in -[JDStatusBarNotificationViewController supportedInterfaceOrientations]
#130774 0x00000001053d2569 in -_UIAlertShimPresentingViewController supportedInterfaceOrientations
#130775 0x0000000102a1e59a in -[JDStatusBarNotificationViewController supportedInterfaceOrientations]
#130776 0x00000001053d2569 in -_UIAlertShimPresentingViewController supportedInterfaceOrientations
#130777 0x0000000104dff380 in -UIViewController __supportedInterfaceOrientations
#130778 0x0000000104dff768 in -UIViewController __withSupportedInterfaceOrientation:apply:
#130779 0x0000000104dffd71 in -UIViewController setInterfaceOrientation:
#130780 0x0000000104df0ba3 in -UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:
#130781 0x0000000104d35a05 in -UIView(Internal) _didMoveFromWindow:toWindow:
#130782 0x0000000104d2decf in __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke ()
#130783 0x0000000104d2de43 in -UIView(Hierarchy) _postMovedFromSuperview:
#130784 0x0000000104d37f48 in -UIView(Internal) _addSubview:positioned:relativeTo:
#130785 0x0000000104d06470 in -UIWindow addRootViewControllerViewIfPossible
#130786 0x0000000104d06c6d in -UIWindow setRootViewController:
#130787 0x00000001053d3a3c in -_UIAlertControllerShimPresenterWindow _presentationViewController
#130788 0x00000001053d3a96 in -_UIAlertControllerShimPresenterWindow presentAlertController:animated:completionBlock:
#130789 0x00000001053d26b2 in -_UIAlertControllerShimPresenter _presentAlertControllerAnimated:completion:
#130790 0x0000000104f2ab19 in -UIAlertView _showAnimated:

Locking device with notification visible causes overlap upon unlock

Tried dismissing the notification before the app resigns active and re-showing when app becomes active... Behavior is a clear status bar message the covers the visible status bar momentarily, then replaces with a solid white notification that hides the status bar.

Just updated to version 1.5.1

This kind of statusbar will be rejected by apple

This is apple's reason for rejection.

----- 10.1 -----

Moreover, we found that your app does not comply with the Apple iOS Human Interface Guidelines, as required by the App Store Review Guidelines.

Specifically, we found that the app inappropriately covers the native iOS status bar.

It may be helpful to review the iOS Human Interface Guidelines to help ensure your app is in compliance with these terms and conditions.

----- 10.3 -----

In addition, we found your app uses system-provided items in a non-standard manner, which is not in compliance with the App Store Review Guidelines.

Specifically, we found that the app attempts to replace or cover information on the native iOS status bar.

This kind of style covers the native iOS status bar, I find a better way to modify.

Screenshot

Undefined symbols for architecture armv7s

My Xcode 5.1, my workspace using Cocoapods, but build for my iPhone 5s,xcode' error is:
Undefined symbols for architecture armv7s:
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It not support Xcode5.1 or my project setting is wrong?

Error running sample project

I am encountering this error, "linker command failed with exit code 1 (use -v to see invocation)" while trying to run the sample project in your zip file. It could be due to the POD file not being setup correctly. Just curious, is it supposed to happen like that?

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

[Feature Request] Status Queues

It would be great to pass in a queue of statuses so that if a bunch of status updates are sent close to one another, you could prevent flashing of them on the status bar and have them programmatically cycled after a certain duration.

MTStatusBarOverlay did this, but because that project has been abandoned, I think many migrators will find your repo and miss that feature as I have.

Do you have any plans to add a feature like this, or to add features to JDStatusBarNotification at all going forward?

iOS 9 warning

iOS 9 needs:

#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
    - (NSUInteger)supportedInterfaceOrientations {
#else
    - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
#endif

instead of

 - (NSUInteger)supportedInterfaceOrientations {

please correct this warning, thanks!

App Rejected

Hi,

I would like to inform you that my app got rejected for violating 10.1/10.3.

10.1: Apps must comply with all terms and conditions explained in the Apple iPhone Human Interface Guidelines and the Apple iPad Human Interface Guidelines
10.3: Apps that do not use system provided items, such as buttons and icons, correctly and as described in the Apple iPhone Human Interface Guidelines and the Apple iPad Human Interface Guidelines may be rejected

10.1/10.3

We also found that your app does not comply with the Apple iOS Human Interface Guidelines, as required by theApp Store Review Guidelines.

Specifically, we found that your app displays an overlay over the status bar. It would be appropriate to revise your app so that it does not display a status bar overlay when loading content.

It may be helpful to review the iOS Human Interface Guidelines to help ensure your app is in compliance with these terms and conditions.

Learn more about system-provided items in the iOS Human Interface Guidelines, sections: "System-Provided Buttons and Icons" and "iOS UI Element Usage Guidelines."

Has anyone else seen this issue from Apple? I dont think I have any choice, but to remove this from my app.

Thanks,
Varun

How To add gesture to statusbarView?

I Try to addGestureRecognizer to JDStatusBarView, but it doesn't work. Is something Wrong?

self.statusBarView = [JDStatusBarNotification showWithStatus:status];
[self.statusBarView addGestureRecognizer:self.tapStausBarGest];

Weird animation

I'm replacing the navigationController.viewControllers array animated and then the notification acts a bit weird. Known bug? Known fix?

Example video of the issue: http://cl.ly/ZGu3/direct

Assigning to 'id<CAAnimationDelegate> _Nullable' from incompatible type 'JDStatusBarNotification *const __strong'

After running Xcode 8 beta 3 and upgrading my project settings to the recommended settings as suggested by Xcode, I get a warning in file JDStatusBarNotification.m on line 334:

Assigning to 'id<CAAnimationDelegate> _Nullable' from incompatible type 'JDStatusBarNotification *const __strong'

I have gotten rid of the warning by declaring the interface conforms to CAAnimationDelegate.

@interface JDStatusBarNotification : NSObject <CAAnimationDelegate>

I suppose this is just a nasty workaround for now and should be resolved appropriately with #ifdefs based on the iOS version?

Custom styles not animating on dismiss

On defining my own styles, the notification bar isn't animating up - only down, regardless of animationType set.

All the default styles work fine, animating up and down. I can customise these myself obviously in the JDStatusBarStyle class, but wanted to give a heads up.

iOS 8.3 Crash in supportedInterfaceOrientations

screen shot 2015-04-20 at 6 46 04 pm

I am using iOS SDK 8.3 and running on devices with iOS 8.3 and it keep crashing whenever i want to dismiss a modal view when JDStatusBar is shown.
Seems like Apple has changed the

supportedInterfaceOrientations

implementation. Is there any work around i can solve this exception?

Thanks

UIStatusBarStyleLightContent issue

My default status bar state is UIStatusBarStyleLightContent.
When the JDStatusBarNotification shows, uistatusbar change to black, and will back to normal light content after dismiss.

I think I have fixed

Add the possibility to set the status bar text and style without recreating it

In my app, I'm updating the status bar based on the progress.

I'm using the following code:

[JDStatusBarNotification showWithStatus:status styleName:@"YDStatusDefault"];

However, performing this a couple of times before dismissing the notification has the strange effect that it recreates the notificiation every time (including the animation).

Therefor, it would be handy if we would have an option to just update the text and status of an already visible status notification.

Statusbar style changes

Hi,

Statusbar style defined by parent controller changes when status bar notification shows up. You can see that when during dismissal. Certainly you cannot notice that if your VC returns default style, but try with light content style and you'll see status bar blinking.

Status bar style not updated if VC requests it during notification

  1. Show notification
  2. Navigate to a VC with a different preferredStatusBarStyle than the current VC
  3. Status bar doesn't change :(
  4. Dismiss notification

I see you hacked around it by making a JDStatusBarNotificationViewController that returns the sharedApplication's statusBarStyle, which only works for the current VC. I hacked around it by returning the keyWindow's rootViewController from my custom overlay window's rootViewController accessor. Both solutions are hackish and prone to bad side effects. If I come up with a better solution, I'll post it here...

under navigation bar

how i can show it under the navigation bar , like facecbook

on top the navigation it may block the UX,
facebook show it under the navigation for definitely a reason :)

JDStatusBarNotification StatusBar shouldAutorotate issue

JDStatusBarNotificationViewController does not implement shouldAutorotate,
even if the Application Keywindow's rootViewController is not support autorotate.

It is seems reasonable to implement shouldAutorotate (in the class JDStatusBarNotificationViewController) as following:

- (BOOL)shouldAutorotate
{
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    return window.rootViewController.shouldAutorotate;
}

Thanks for your time!

Bar with height of 64

It is possible to make a notification bar with height of 64?
I tried in "JDStatusBarNotification.m" with

[self updateTopBarFrameWithStatusBarFrame:CGRectMake(0, 0, self.overlayWindow.frame.size.width, 64)];

but this is what i get

img_0818

If i change 64 to 128 this is what i get (correct height but text label is cutted off)
img_0817

What is the correct way?

Status Bar notification not animating correctly when using "pull to refresh" view above scrollview?

Hi, great library and thanks for sharing!

I am having an issue where the status bar is not animating correctly and instead of just moving from the top down to cover the status bar it kind of loops down below the status bar and back up to its normal position.

I am using a UICollectionView inside a navigation controller as well as SSPullToRefresh which i believe to be the culprit as this issue does not appear on view controllers that do not have a pull to refresh view above the scrollview.

I have a feeling it might be something to do with how the pull to refresh view is extending the height of the view upwards beyond the top of the screen?

Any suggestions?

Random Black screen on iPad

There might be a problem while presenting the status bar with the code pasted below, it appears only on iPad (i've tested it with an iPad Air iOS 8.4.1), tested also with both iPhone 5-5s-6-6plus and it doesn't appear.

the way i set it up:
[JDStatusBarNotification setDefaultStyle:^JDStatusBarStyle *(JDStatusBarStyle *style) {
style.barColor = companyColor();
style.textColor = [UIColor whiteColor];
style.animationType = JDStatusBarAnimationTypeMove;
style.progressBarColor = style.textColor;
style.progressBarHeight = 2.0;
style.font = [LCUtils fontWithSize:14];
style.progressBarPosition = JDStatusBarProgressBarPositionTop;
return style;
}];

the way i present it
[JDStatusBarNotification showProgress:[engine.overallReplicationProgress unsignedIntegerValue]];

the screen flashes and it show up like in the screenshot
img_0240

thank you!

Deprecations in iOS7

sizeWithFont and wantsFullScreenLayout is deprecated in iOS7. Will you be updating JDStatusBarNotification to reflect these deprecations?

Really love this control by the way! Awesome job!

Fix jerky status animations

Hi,

I've implemented a simple queue that kind of spams JDSBN since I never know what it presents at that very moment.

I have a progress that I need to update along with text that may or may not change, I call it as:

[JDStatusBarNotification showWithStatus:self.message styleName:self.styleName];
[JDStatusBarNotification showProgress:self.progress];

So instead of ignoring status updates it performs some jerky animation. Is it possible to fix JDSBN to ignore repeating events?

libPods.a missing

I wanted to run the example provided via the zip file, I got error saying that the "libPods" library is missing

Not update immediately in non-ViewController's singleton

I test this in my first launched view controller

[JDStatusBarNotification showWithStatus:@"Welcome" dismissAfter:1.0 styleName:JDStatusBarStyleDefault];

it works great !

But if there is an data processing singleton , it needs update the current data to users screen.

It works, but showing after about 10 seconds !!

It's weird , how to deal with this ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.