Broken nib

Broken nib


I cannot inform whether it's a bug or perhaps not, but it is seriously a change. Definitely they could change it back... Whatever the case, the rule in seed 5 is:

The view operator will not immediately get a hold of its .xib because it offers similar name. You must provide you with the title explicitly.

So for you personally any make an effort to initialize this view operator must ultimately call nibName:bundle: with a specific nib title ("TestVC"), I assume.

If you wish to be able to initialize by phoning

allow vc = TestVC

while performing inside showing view operator, after that simply override init when you look at the provided view controller to phone super.init(nibName:"TestVC", bundle:nil) and that is all you have to (except that I think you'll also need the init(coder:) stopper discussed here).

EDIT you may be absolutely correct that is a Swift-only problem. Well spotted. In Objective-C, initializing with init (or brand new) still works good; the view controller discovers its eponymous .xib file precisely.

DIFFERENT EDIT The deciding factor is certainly not whether Objective-C or Swift calls init. It is whether or not the view operator itself is printed in Objective-C or Swift.

FINAL EDIT The workaround would be to declare your quick view controller like this:

@objc(ViewController) ViewController : UIViewController { // ...

Title in parentheses eliminates title mangling that is inducing the issue. It is likely that next release this will be fixed and you can make the @objc away once again.

ANOTHER FINAL EDIT Bad development: the bug report we filed with this came back "works as meant". They point out that every i must do is name the .xib file following the surrounding module, e.g. if my software is known as NibFinder, then if I label my .xib file NibFinder.ViewController.xib, it's going to be discovered automatically when instantiating ViewController.

That's true adequate, in my visualize it simply restates the bug; the Swift lookup treatment is prepending the component title. So Apple is saying i will knuckle under and prepend exactly the same module name to my .xib file, whereas i'm stating that Apple should knuckle under and remove the component title off whilst works the search.

EDIT WHICH TRULY TRULY FINAL This bug is fixed in iOS 9 beta 4 and all sorts of these workarounds come to be unneeded.



Share this article





Related Posts


Waterman Pencils
Waterman Pencils
Waterman Canada
Waterman Canada
Waterman blue-black
Waterman blue-black

Latest Posts
Pilot Petit1 Mini Fountain Pen
Pilot Petit1…
This will be a wonderful pen, in all…
Sheaffer White Dot Fountain Pen
Sheaffer White…
This advertisement from the might 1943…
Lamy Nexx Fountain Pen
Lamy Nexx Fountain…
Breathtaking handwriting is an expression…
Font Styles alphabet
Font Styles alphabet
Font Styles offer the capacity to change…
Lamy Dialogue 3
Lamy Dialogue…
Lamy Dialog 3 (f Nib) Review - Fountain…
Search
Featured posts
  • Waterman Pencils
  • Waterman Canada
  • Waterman blue-black
  • Waterman Pens India
  • Waterman Paris France
  • Waterman Hemisphere Fountain Pen
  • Old Waterman Pens
  • Pens Waterman
  • Waterman Pens Australia
Copyright © 2017 l www.fountainpenbiz.com. All rights reserved.