Giter Site home page Giter Site logo

wmpagecontroller-swift's People

Contributors

aalenliang avatar allenx avatar litt1e-p avatar wangmchn 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

wmpagecontroller-swift's Issues

Crashed in PageController.removeSuperfluousViewControllersIfNeeded()

我的Controller层级是这样的:

PageController
    |
    -- UICollectionViewController  --> DetailViewController
    -- UICollectionViewController
    -- UICollectionViewController

当反复进入 DetailViewController再返回时会出现crash,具体代码在 PageController.removeSuperfluousViewControllersIfNeeded() line 337,能帮忙看看是什么原因导致的吗?非常感谢!

Bug with programmatically dragging content controller

1/ I don't understand why we need "animation" private property? It does not contain any information after user dragged manually content (this property is not resetted anywhere).
2/ How I can programmatically drag content? If I set contentOffset for contentView, then I see next: if user dragged content already, then it works, but if user did not drag yet, then it does not work. It happens because "animation" property is false

stepping may behave oddly; variables may not be available

public func selectItemAtIndex(index: Int) {
        let tag = index + tagGap
        let currentIndex = selectedItem.tag - tagGap //this line exit break
        guard currentIndex != index && selectedItem != nil else { return }

        let menuItem = viewWithTag(tag) as! MenuItem
        selectedItem.selected = false
        selectedItem = menuItem
        selectedItem.selected = true
        progressView?.moveToPosition(index, animation: false)
        delegate?.menuView?(self, didSelectedIndex: index, fromIndex: currentIndex)
        refreshContentOffset()
    }

fatal error: unexpectedly found nil while unwrapping an Optional value

首先非常感谢贡献这么好用的library!

在使用的过程中发现一个必现的crash:从PageControllerpop back时会crash:fatal error: unexpectedly found nil while unwrapping an Optional value,不确定是不是我使用上有什么疏漏,我用的是Storyboard。

具体出错代码是在MenuView.swift line 214:let itemWidth = delegate!.menuView(self, widthForItemAtIndex: index)

Unable to dequeue a cell with identifier when embedded into WMPageController

I am using WMPageController in storyboard. I have a customized UITableViewController with prototype cells, it works well when stand alone. But when embedded it into WMPageController, a crash happens. The error message is:Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier VoucherListCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'.

Could you please to help find out what is going wrong? Thanks a lot.

适配一下swift4.2

新项目准备使用swift,WMPageController-Swift有空可以升级到swift4.2吗,Thank you.

iOS10 bug? NSClassFromString("_UINavigationBarBackground") gets nil?

hi, @wangmchn , my app crashed when I run it in iOS10 phone, it gets an error that fatal error: unexpectedly found nil while unwrapping an Optional value, this error perhaps caused by func: adjustMenuViewFrame, iOS 10 does not has this class : NSClassFromString("_UINavigationBarBackground")?, I have tried to fix it and it works by below codes:

for subview in (navigationController?.navigationBar.subviews)! {
                // add a guard to filter that missing class: _UINavigationBarBackground
                guard let _ = NSClassFromString("_UINavigationBarBackground") else {
                    continue
                }
                guard !subview.isKindOfClass(NSClassFromString("_UINavigationBarBackground")!) && !subview.isKindOfClass(MenuView.self) && (subview.alpha != 0) && (subview.hidden == false) else { continue }

                let maxX = CGRectGetMaxX(subview.frame)
                if maxX < viewWidth / 2 {
                    let leftWidth = maxX
                    menuX = menuX > leftWidth ? menuX : leftWidth
                }
                let minX = CGRectGetMinX(subview.frame)
                if minX > viewWidth / 2 {
                    let width = viewWidth - minX
                    rightWidth = rightWidth > width ? rightWidth : width
                }

            }

I don't know whether it will cause other bug, or maybe it not the correct way to avoid the crash.

Environment: Xcode8, Swift2.3, iOS 10

thanks.

WMPageController change NavigationBar/TabBar color

When embedded WMPageController into UINavigationBarController or UITabBarController, the color of navigation bar/tab bar change to a little bit transparent and dark. The Objective-C version has the same issue, I tested with the demo code.

Still I am using storyboard, if it may be a cause.

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.