Comments (6)
Since my app does not support landscape rotation, resizing the UIWindow to (0, 0, 320, 64) fixed it for me.
from cwstatusbarnotification.
Right I've tried that as well, but I want to keep landscape support for the repo :)
from cwstatusbarnotification.
Line : 281
Replace
self.notificationWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
with
self.notificationWindow = [[UIWindow alloc] initWithFrame:CGRectMake([[UIScreen mainScreen] bounds].origin.x, [[UIScreen mainScreen] bounds].origin.y, [[UIScreen mainScreen] bounds].size.width, [self notificationLabelHeight])];
from cwstatusbarnotification.
I managed to fix this by creating a UIWindow subclass, and overriding hitTest:withEvent:
Works like a charm.
You must set userInteractionEnable to NO on the window instance tho.
@interface CWWindowContainer : UIWindow
@end
@implementation CWWindowContainer
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
if (point.y > 0 && point.y < [UIApplication sharedApplication].statusBarFrame.size.height) {
return [super hitTest:point withEvent:event];
}
return nil;
}
@end
from cwstatusbarnotification.
Sweet! Thanks, I just pushed this fix.
from cwstatusbarnotification.
I'm glad it helps! Thanks for building this great library ;)
from cwstatusbarnotification.
Related Issues (20)
- Property "preferredStatusBarStyle" of "UIViewController" has become readonly, leading to crash. HOT 6
- Error : Module file was created by an older version of the compiler; rebuild 'CWStatusBarNotification' and try again: /Users/leela/FASME NATIVE NEW/FASME_NATIVE_NEW/mobile_development/ios_development/FASME_New/fasme_native_development parse/CWStatusBarNotification.framework/Modules/CWStatusBarNotification.swiftmodule/arm.swiftmodule
- Set custom notification height HOT 1
- Extreme CPU usage
- Any thoughts on switching to the "home indicator" area for iPhone X? (screenshot) HOT 48
- iPhone X and Swift 4 support ? HOT 1
- iPhone X navigation bar style with text not centered HOT 6
- Swipe to dismiss
- iOS13 状态栏系统时间把notificationLabel遮挡
- Component not drawing over status bar anymore on iOS 13 HOT 7
- Component not working with UIScene
- Navigation Bar Color being changed HOT 2
- How to push the specified controller ?
- Xcode 8 beta 2 error HOT 10
- Xcode beta 2 issue
- Update latest code on cocoapods HOT 2
- Can you add a new api like this?
- Use of undeclared identifier '_preferredStatusBarStyle' HOT 1
- iOS 10 : XCode 8 : preferredStatusBarStyle HOT 1
- Support Swift 3.0? HOT 6
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 cwstatusbarnotification.