Comments (13)
Are these lines called when you dismiss the modal?
DZNWebViewController/Source/Classes/DZNWebViewController.m
Lines 858 to 862 in e1731d9
PS: You shouldn't have to remove observers yourself. It should do it internally.
from dznwebviewcontroller.
It crashes when I show the modal. And it happens at random times. Sometimes I can show the modal for a particular link 2 or 3 times before eventually crashing.
Unfortunately Xcode only says it's crashes at the appdelegate class, so I can't give you anymore information:
class AppDelegate: UIResponder, UIApplicationDelegate {
from dznwebviewcontroller.
Try adding an exception breakpoint.
https://developer.apple.com/library/ios/recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html
Unless you're using a dynamic framework, it should still point out where the exception is being triggered.
from dznwebviewcontroller.
It still showing that same line. I tried to debug step by step and it crashes when i present the viewcontroller.
self.presentViewController(webModalNC, animated: true, completion: nil)
from dznwebviewcontroller.
You should try weak referencing webModalNC..
from dznwebviewcontroller.
Doesn't look like webModalNC
is a property for him. Is it?
from dznwebviewcontroller.
I declared webModalNC as weak at the top
'weak var webModalNC: UINavigationController?'
and now it's always nil even after initializing the UINavigationController in showSource().
from dznwebviewcontroller.
Does it need to be a var
? Can't you just make it a let
in your implementation scope?
Try sharing a gist of your implementation as it is hard to help by guessing..
from dznwebviewcontroller.
var webModalNC: UINavigationController?
func showSource(url: String) {
let vc = DZNWebViewController(URL: NSURL(string: url)!)
self.webModalNC = UINavigationController(rootViewController: vc)
vc.supportedWebNavigationTools = DZNWebNavigationTools.All
vc.supportedWebActions = DZNsupportedWebActions.DZNWebActionAll
vc.showLoadingProgress = true
vc.hideBarsWithGestures = true
vc.showPageTitleAndURL = true
let closeButton = UIBarButtonItem(title: "Close", style: .Plain, target: self, action: #selector(HomeViewController.closeWebModal))
vc.navigationItem.rightBarButtonItem = closeButton
self.presentViewController(webModalNC!, animated: true, completion: nil)
}
func closeWebModal() {
self.webModalNC!.dismissViewControllerAnimated(true, {
self.webModalNC = nil
})
}
from dznwebviewcontroller.
not sure if i'm doing this right..
https://gist.github.com/jaybuangan/1a8c020ac2b2b213928bc2afa865be22
i took out all the tableview code.
basically there's a view in a tableviewcell that when clicked, calls a delegate function "showSource" which is defined in this view controller. It's just passing a URL string.
from dznwebviewcontroller.
Also crashes for me, same scenario as above. I am showng it as a modal, crashes on exit with debugger pointing to AppDelegate.
from dznwebviewcontroller.
i have the same issue while dismiss view controller
from dznwebviewcontroller.
Same issue here, crashing on clients but i cant debug because crashlytics dont give enough info for this crash.
Fatal Exception: NSInternalInconsistencyException
An instance 0x14dd45670 of class UINavigationBar was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x170229100> ( <NSKeyValueObservance 0x17005fd70: Observer: 0x14dd24c00, Key path: hidden, Options: <New: YES, Old: NO, Prior: NO> Context: 0x1002c76a8, Property: 0x170251ca0> <NSKeyValueObservance 0x1702585d0: Observer: 0x14dd24c00, Key path: center, Options: <New: YES, Old: NO, Prior: NO> Context: 0x1002c76a8, Property: 0x170251f40> <NSKeyValueObservance 0x170252660: Observer: 0x14dd24c00, Key path: alpha, Options: <New: YES, Old: NO, Prior: NO> Context: 0x1002c76a8, Property: 0x170251d00> )
from dznwebviewcontroller.
Related Issues (20)
- Turbolinks not enabling back/forward buttons HOT 1
- HTTP urls not working please help me on this HOT 2
- Dismissing during page load causes KVO crash HOT 10
- Loading URLs HOT 1
- Carthage support? HOT 5
- How to use a custom User Agent? HOT 4
- Required load request method HOT 3
- Support for popupwindow in few websites HOT 3
- toolbarHidden HOT 1
- EXC_BAD_ACCESS
- How to dismiss the view? HOT 4
- how to play video in website HOT 1
- Undefined symbols for architecture x86_64: HOT 1
- Warnings in Xcode 8.3 and Swift 3.1
- Carthage install not working
- toolbar block bottom of website content
- post method
- URL loads but don't get callback of didFinish Navigation method or other callback methods HOT 1
- iOS 11 status bar overlaps with DZWebViewController top bar HOT 1
- Problems with Apple Review
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 dznwebviewcontroller.