Code Monkey home page Code Monkey logo

bwstatusbaroverlay's Issues

Issue in Landscape

Steps to reproduce :

Go in landscape mode then execute the following code :

BWStatusBarOverlay *overlay = [[BWStatusBarOverlay alloc] init];
[overlay showSuccessWithMessage:@"Hello world" duration:2 animated:YES];

Note that this issue doesn't happend when you use the shared object. (I suspect it's because the shared object listens to the rotation events).

Can't show in no-arc project

I add this control to no-arc project, flag the .m file to -fobjc-arc. when I run the prject,

[BWStatusBarOverlay setMessage:@"hello" animated:YES];

without anything show. Please give me some advice.thx

question:

I use this and I have a quetion that what is relationship between my project`s keywindow and this window(The instance of BWStatusBarOverlay ) , why can it be added my window? Just set windowlevel = statbarwindowlevel+1 but I cant find such as [self addSubview:The instance of BWStatusBarOverlay ] code.
790ad9f1e88416dc78b89d8f707f2f7c and the two window is paratactic, but why???

setProgressBackgroundColor not setting color correctly

I attempt to call setProgressBackgroundColor with a UIColor and it shows the progress bar in blue regardless. What is the correct way of making the progress bar a different color?

Here's my code:

[BWStatusBarOverlay setStatusBarStyle:UIStatusBarStyleBlackOpaque animated:NO];
[BWStatusBarOverlay setAnimation:BWStatusBarOverlayAnimationTypeFromTop];
[BWStatusBarOverlay setProgressBackgroundColor:[UIColor colorWithRed:(float)206/255 green:(float)22/255 blue:(float)73/255 alpha:(float)1.0]];
[BWStatusBarOverlay showWithMessage:@"Uploading" loading:YES animated:YES];

[operation setUploadProgressBlock:^(NSInteger bytesWritten, NSInteger totalBytesWritten, NSInteger totalBytesExpectedToWrite) {
    //update the progress bar
    [BWStatusBarOverlay setProgress:(totalBytesWritten / (float)totalBytesExpectedToWrite) animated:YES];
}];

//reassign the completion block
[operation setCompletionBlockWithSuccess: ^(AFHTTPRequestOperation *operation, id responseObject) {
    //hide the progress bar if we're at the end
    [BWStatusBarOverlay showSuccessWithMessage:@"Done uploading!" duration:2 animated:YES];

} 
                                 failure:^(AFHTTPRequestOperation *operation, NSError *error) {
                                 }];

//add the operation to the queue
[self.uploadQueue addOperation:operation];

Thanks in advance -- great control!

Tim

Thread issues

The status bar with duration failed dismiss if you use it not in the main thread. Your thread exit earlier then the method performSelector:withObject:afterDelay:duration will be invoked.

Solution:
Modify the next method:

  • (void)showMessage:(NSString *)message withStatus:(BWStatusBarOverlayStatus)status duration:(NSTimeInterval)duration animated:(BOOL)animated

You should add run loop at the end of this method:
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:duration]];

It prevent the exit of statusBar's thread.

App Rejected

App Rejected for using BWStatusBarOverlay.

From Apple:
"The app displays a custom status bar overlay. It would be appropriate to remove this overlay."

Doubled Size Status Bar

When a app with BWStatusBarOverlay is started with a doubled size status bar (for example when the personal hotspot is activated) the overlay also doubles its size. If the status bar later gets back to its original size the Overlay still has the doubled size and overlays the app content.

Not working in landscape

I needed to show it in landscape and portrait view. Currently code is not working in landscape. If landscape become hide. Be support both landscape and portrait.

Add appropriate license

Appropriate license needs to be added to give credit to myell0w's MTStatusBarOverlay from which this "fork" is using both code and inspiration.

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.