brunow / bwstatusbaroverlay Goto Github PK
View Code? Open in Web Editor NEWBWStatusBarOverlay is a custom status bar overlay window.
License: Apache License 2.0
BWStatusBarOverlay is a custom status bar overlay window.
License: Apache License 2.0
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).
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
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.
and the two window is paratactic, but why???
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
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:
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 for using BWStatusBarOverlay.
From Apple:
"The app displays a custom status bar overlay. It would be appropriate to remove this overlay."
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.
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.
Appropriate license needs to be added to give credit to myell0w's MTStatusBarOverlay from which this "fork" is using both code and inspiration.
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.