Code Monkey home page Code Monkey logo

sahistorynavigationviewcontroller's Introduction

marty-suzuki's GitHub stats

sahistorynavigationviewcontroller's People

Contributors

apouche avatar ayushgoel avatar jakemarsh avatar marty-suzuki avatar ratzinho87 avatar syky27 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sahistorynavigationviewcontroller's Issues

Cannot set if historyContentView.backgroundColor

Hi!
First of all, I would like to say that this is one of the greatest new functionality I have seen in a long time, It perfectly fits in my app!

There is just one little tiny detail on iOS 9.2 setting up background color gets overriten in SAHistoryNavigationViewController.swift on line 49. I haven't tested this on any other version of iOS, but I am pretty sure that it won't work also.

So I have made a really tiny change, basically just check if backgroundColor is already set, if so It won't get ser on grayColor.

Tested and It works now.

Warning when going back and a tabbar controller has been pushed

The warning is: Unbalanced calls to begin/end appearance transitions for UITabBarController: 0x7fb91bd2a850.

Consider the following scenario in storyboards:

  • Have a navigation controller as the initial view controller wit a UIViewController
  • Add a button to the UIViewController that leads to a UITabbarController

Tap on the button to see the tabbar controller, then long press the back button to see the error above.

I can provide you a zip file if you want with this test case, no code involved, just storyboards.

Crash when inheriting SAHistoryNavigationViewController

I gave this lib a try but discovered a nasty crash when using it on iOS 9.2
Here's the end of the stack trace.

* thread #1: tid = 0x9b91cc, 0x0000000103fd1dbb libobjc.A.dylib`objc_exception_throw, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000103fd1dbb libobjc.A.dylib`objc_exception_throw
    frame #1: 0x000000010304ad9d CoreFoundation`+[NSException raise:format:] + 205
    frame #2: 0x0000000101466f0a UIKit`-[UINavigationBar setDelegate:] + 81
  * frame #3: 0x00000001012c228a SAHistoryNavigationViewController`SAHistoryNavigationViewController.SAHistoryNavigationViewController.viewDidLoad (self=<unavailable>)() -> () + 1418 at SAHistoryNavigationViewController.swift:101
    frame #4: 0x0000000100337059 CaptainJet`CaptainJet.CaptainJetNavigationController.viewDidLoad (self=0x00007fc03304e200)() -> () + 41 at CaptainJetNavigationController.swift:16
    frame #5: 0x0000000100337932 CaptainJet`@objc CaptainJet.CaptainJetNavigationController.viewDidLoad (CaptainJet.CaptainJetNavigationController)() -> () + 34 at CaptainJetNavigationController.swift:0
    frame #6: 0x0000000101508f98 UIKit`-[UIViewController loadViewIfRequired] + 1198
    frame #7: 0x00000001015092e7 UIKit`-[UIViewController view] + 27
    frame #8: 0x000000010155184b UIKit`-[UINavigationController pushViewController:transition:forceImmediate:] + 663
    frame #9: 0x0000000101551299 UIKit`-[UINavigationController pushViewController:animated:] + 848
    frame #10: 0x00000001012c28d8 

The debugger gives this output: Cannot manually set the delegate on a UINavigationBar managed by a controller.

Looking at the documentation you can see that:

If the navigation bar was created by a navigation controller and is being managed by that object, you must not change the value of this property. Navigation controllers act as the delegate for any navigation bars they create.

This is what is happening here. The controller automatically becomes the navigationBar delegate. I think this line should be removed. Let me know if you need a PR I would happily do so.

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.