Code Monkey home page Code Monkey logo

Comments (6)

marcshilling avatar marcshilling commented on August 17, 2024

Since my app does not support landscape rotation, resizing the UIWindow to (0, 0, 320, 64) fixed it for me.

from cwstatusbarnotification.

cezarywojcik avatar cezarywojcik commented on August 17, 2024

Right I've tried that as well, but I want to keep landscape support for the repo :)

from cwstatusbarnotification.

danipralea avatar danipralea commented on August 17, 2024

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.

dzenbot avatar dzenbot commented on August 17, 2024

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.

cezarywojcik avatar cezarywojcik commented on August 17, 2024

Sweet! Thanks, I just pushed this fix.

8382cd9

from cwstatusbarnotification.

dzenbot avatar dzenbot commented on August 17, 2024

I'm glad it helps! Thanks for building this great library ;)

from cwstatusbarnotification.

Related Issues (20)

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.