GithubHelp home page GithubHelp logo

hfossli / agwindowview Goto Github PK

View Code? Open in Web Editor NEW
230.0 230.0 32.0 236 KB

Add as many UIView's to UIWindow as you want. Specify the orientation or just follow the status bar.

License: Other

Objective-C 98.36% Ruby 1.64%

agwindowview's Introduction

hfossli pages

agwindowview's People

Contributors

choefele avatar hfossli avatar langtind avatar readmecritic 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

agwindowview's Issues

New maintainer of AGWindowView wanted

Since I'm not using AGWindowView in any of my current running projects I'm not fit for the task of maintaining this project.

Let me know if you are interested in this open source project as the role of maintainer.

UIWebView Add as SubView

When adding a UIWebView as subView I got a crash. This is what I get:

(lldb) po [NSThread callStackSymbols]
<_NSCallStackArray 0x1704543a0>(
0   ???                                 0x000000010802cbb4 0x0 + 4429368244,
1   MXMTestbed                          0x000000010017f520 main + 0,
2   CoreFoundation                      0x0000000185096100 <redacted> + 144,
3   CoreFoundation                      0x0000000184f922fc <redacted> + 296,
4   CoreFoundation                      0x0000000184f96e30 <redacted> + 68,
5   WebKitLegacy                        0x0000000194c8177c <redacted> + 172,
6   CoreFoundation                      0x0000000185093f6c <redacted> + 440,
7   CoreFoundation                      0x0000000184f96ccc _CF_forwarding_prep_0 + 92,
8   CoreFoundation                      0x0000000185096100 <redacted> + 144,
9   CoreFoundation                      0x0000000184f922fc <redacted> + 296,
10  WebCore                             0x0000000193e26a3c <redacted> + 120,
11  CoreFoundation                      0x0000000185048240 <redacted> + 24,
12  CoreFoundation                      0x00000001850474e4 <redacted> + 264,
13  CoreFoundation                      0x0000000185045594 <redacted> + 712,
14  CoreFoundation                      0x0000000184f712d4 CFRunLoopRunSpecific + 396,
15  GraphicsServices                    0x000000018e9c76fc GSEventRunModal + 168,
16  UIKit                               0x0000000189b6ef40 UIApplicationMain + 1488,
17  MXMTestbed                          0x000000010017f59c main + 124,
18  libdyld.dylib                       0x0000000197406a08 <redacted> + 4
)

and from bt

(lldb) bt
* thread #1: tid = 0x2862c2, 0x0000000196d6fbd0 libobjc.A.dylib`objc_msgSend + 16, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x6000010)
    frame #0: 0x0000000196d6fbd0 libobjc.A.dylib`objc_msgSend + 16
    frame #1: 0x0000000189d31fd0 UIKit`-[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 220
    frame #2: 0x0000000185096100 CoreFoundation`__invoking___ + 144
    frame #3: 0x0000000184f922fc CoreFoundation`-[NSInvocation invoke] + 296
    frame #4: 0x0000000184f96e30 CoreFoundation`-[NSInvocation invokeWithTarget:] + 68
    frame #5: 0x0000000194c8177c WebKitLegacy`-[_WebSafeForwarder forwardInvocation:] + 172
    frame #6: 0x0000000185093f6c CoreFoundation`___forwarding___ + 440
    frame #7: 0x0000000184f96ccc CoreFoundation`_CF_forwarding_prep_0 + 92
    frame #8: 0x0000000185096100 CoreFoundation`__invoking___ + 144
    frame #9: 0x0000000184f922fc CoreFoundation`-[NSInvocation invoke] + 296
    frame #10: 0x0000000193e26a3c WebCore`HandleDelegateSource(void*) + 120
    frame #11: 0x0000000185048240 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
    frame #12: 0x00000001850474e4 CoreFoundation`__CFRunLoopDoSources0 + 264
    frame #13: 0x0000000185045594 CoreFoundation`__CFRunLoopRun + 712
    frame #14: 0x0000000184f712d4 CoreFoundation`CFRunLoopRunSpecific + 396
    frame #15: 0x000000018e9c76fc GraphicsServices`GSEventRunModal + 168
    frame #16: 0x0000000189b6ef40 UIKit`UIApplicationMain + 1488
  * frame #17: 0x000000010017f59c MXMTestbed`main(argc=1, argv=0x000000016fdb39d8) + 124 at main.m:16
    frame #18: 0x0000000197406a08 libdyld.dylib`start + 4

To me it seems the crash is due to a event forwading, but I'm not sure about that.

Rotation should be possible even with locked statusBar orientation

Currently the rotation is based on -[UIApplication statusBarOrientation]. In our setup we want to show a movie player view that only supports LandscapeLeft and LandscapeRight, but the interface of the main app is Portrait only. Therefore the statusBarOrientation can and will never change, and therefore no rotation is triggered.

You think it would be okay to rely on -[UIDevice orientation] for the rotation?

Getting crash when removing.

Im using your awesome lib, but seem to be experiencing a weird crash. Adding to the view, and handling rotation works perfectly but when it's time to remove it. Im experiencing a crash;

[self.statusWindow fadeOutAndRemoveFromSuperview:^{

}];

Results in: *** -[__NSArrayM removeObject:]: message sent to deallocated instance

Happening on line 227 in the -didMoveToWindow method, more specifically on; [_activeWindows removeObject:self];

Am I misunderstanding something?

iOS 7 Support?

I've downloaded the latest version (0.1.9) and things work like a charm on iOS 8 but things are broken in iOS 7. Is this a known issue? From what I can tell the UIViewController that manages my AGWindowView receives the viewWillLayoutSubviews method when we rotate but the coordinate system isn't transformed properly.

Example, I set a CGRect to the AGWindowView as {0,0,500,50} and this translates to a view that is tall and narrow.

How are we supposed to sync the AGWindowView's coordinate system transform with it's ViewController?

initAndAddToKeyWindow does not dispatch touch events to subviews

I'm adding a UIWebView to the AGWindow for testing purposes. I'm doing

dispatch_async(dispatch_get_main_queue(), ^{
        //UIWindow *keyWindow = [[[UIApplication sharedApplication] delegate] window];
        //[keyWindow addSubview:self.webView];
        self.windowView =[[AGWindowView alloc] initAndAddToKeyWindow];
        [self.windowView setOnlySubviewsCapturesTouch:NO]; /// tried YES as well
        [self.windowView addSubview:self.webView];

        [self.webView loadRequest: [NSURLRequest requestWithURL:url]];
    });

but it seems that no touch events are fired on the UIWebView. The UIWebView has touch events enabled through user interaction set to YES:

self.webView = [[UIWebView alloc] initWithFrame:rect];
    self.webView.backgroundColor = [UIColor whiteColor];
    self.webView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
    self.webView.opaque=NO;
    self.webView.userInteractionEnabled=YES;
    self.webView.delegate=self;

iOS8

On iOS8 the behavior of UIWindows is changed, messing up everything, are you planning to release an update?
Thanks

AirPlay device picker broken on iOS8 iPad

When I created a MPVolumeView with showsRouteButton=YES and added it inside a view in AGWindowView, I can manipulate volume etc. but when I press the AirPlay button, the device picker window does not appear.

This only happens on iOS 8 and iPad. iPhone seems to have a different style popup and it is working fine.

Any idea why this is happening? Might be a platform bug too because on iOS7 it worked just fine.

AGWindowView bad layout when behind a pop-up UINavigationController

Hi Håvard

I find a bug about AGWidowView
Steps like this:

  1. Change the Application to landScape
  2. Pop One UINavigationController
  3. Dismiss the UINavigationController, then the AGWindowView will get a bad layout. it's origin is (80, 80) not (0, 0)

My Solution is remove the code [self rotateAccordingToStatusBarOrientationAndSupportedOrientations]; in didMoveToWindow method.

I guess the reason is when dismiss the controller, it is in a animation, and the code didMoveToWindow also trigger layout same time, this may cause a bad state a view layout.

Do you think so, what's your suggestion?

Thanks!

WindowView not overlaying keyboard

Hi,

First of all, thanks for a great job with this library. There's one thing, i can't understand how to make it with your library. Imagine following situation: There's a stack of view controllers, by clicking next button in one of them, next view controller is opened. When this second vc is opened, some textfield in that controller becomes first responder. So keyboard becomes visible. The problem here, is that AGWindowView is not overlaying this keyboard. It's keyboard overlaying AGWindowView.

If i get it correct, AGwindowView uses keyWindow, which is usually the first window in UIApplication windows array. And when keyboard shows, Additional window(actually UITextEffectWindow) is added to windows array. So UITextEffectWindow is now on top of key window.

iOS 5 Support?

Hi,

I was trying to figure out if iOS5 is supported?
I've seen you use UIInterfaceOrientationMask but if compiled with an iOS6+ SDK this is just an int... So just the type being used is nothing that would stop it from running on iOS 5.

I could not find a method that is post iOS 5 being called while having a quick look.

Thanks for a quick reply :)

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.