Skip to content

Commit cf5e990

Browse files
committed
Update documentation to reflect import workaround
Relates to issue #98
1 parent 77cf5fc commit cf5e990

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed
37.4 KB
Loading

Documentation/QandA.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Xcode might autocomplete a function with a `Void` argument (`R.image.settingsIco
2323

2424
The reason this happens is because of the availability of the var `R.image.settingsIcon.*` for information about the image and also having a function with named the same name.
2525

26+
## How to fix missing imports in the generated file?
27+
28+
If you get errors like `Use of undeclared type 'SomeType'` in the `R.generated.swift` file most of the time this can be fixed by [explicitly stating the module in your xib or storyboard](Images/ExplicitCustomModule.png). This will make R.swift recognize that an import is necessary.
29+
2630
## How does R.swift work?
2731

2832
During installation you add R.swift as a Build phase to your target, basically this means that:

Readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Runtime validation with [`R.assertValid()`](Documentation/Examples.md#runtime-va
6060
- [Why should I choose R.swift over alternative X or Y?](Documentation/QandA.md#why-should-i-choose-rswift-over-alternative-x-or-y)
6161
- [What are the requirements to run R.swift?](Documentation/QandA.md#what-are-the-requirements-to-run-rswift)
6262
- [How to use methods with a `Void` argument?](Documentation/QandA.md#how-to-use-methods-with-a-void-argument)
63+
- [How to fix missing imports in the generated file?](Documentation/QandA.md#how-to-fix-missing-imports-in-the-generated-file)
6364
- [How does R.swift work?](Documentation/QandA.md#how-does-rswift-work)
6465
- [How to upgrade to 1.0?](Documentation/Migration.md)
6566

0 commit comments

Comments
 (0)