I am trying to use UINavigationController
. I have two views which are being created programmatically. When a UIButton
is pressed on the first v
If you have tried everything and you still get this error, try re-creating the class file from scratch but remember to select the "Also create XIB file" check box. This will auto link up a few items that are not linked when creating these files separately. After this is created, you can likely cut and paste everything onto the new XIB and it should work fine.
Do This(You have no view in xib so add one and then do this):
follo following steps
1) open your xib file then right click on files owner and drag to your first view
2) then bind that view with outlet of "view"
hope you will get it...
Thanks,
Select File's owner
of your .xib, open the Identity Inspector
, make sure Custom Class
is set to the same name as your controller's class name. If you create IB file and Controller separately(in separate steps), you might forget to check this.
If you are not seeing the "view" outlet to select from on the "Connections inspector" (rightmost) tab, I found that I had to go back to a generic view controller (e.g., UICollectionViewController) for the File's Owner Custom Class instead of my subclass that I had entered previously. After closing and reopening Xcode, the view outlet appeared again so I connected it as described in sagarcool89's answer. I then set my File's Owner Custom Class back to my subclass and have finally moved past this error.