Skip to content

Commit

Permalink
Add access level to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mac-cain13 committed Oct 6, 2016
1 parent db4310b commit 272d431
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Documentation/QandA.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ The reason this happens is because of the availability of the var `R.image.setti

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.

## Can I use R.swift in a library?

Yes, just add R.swift as a buildstep in your library project and it will work just like normal. If you want to expose the resources to users of your library you have to make the generated code public, you can do this by adding `--accessLevel public` to the call to R.swift.

For example Cocoapods users would change their build step to: `"$SRCROOT/rswift" --accessLevel public "$SRCROOT"`

## How does R.swift work?

During installation you add R.swift as a Build phase to your target, basically this means that:
Expand Down
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Runtime validation with [`R.validate()`](Documentation/Examples.md#runtime-valid
- [What are the requirements to run R.swift?](Documentation/QandA.md#what-are-the-requirements-to-run-rswift)
- [How to use methods with a `Void` argument?](Documentation/QandA.md#how-to-use-methods-with-a-void-argument)
- [How to fix missing imports in the generated file?](Documentation/QandA.md#how-to-fix-missing-imports-in-the-generated-file)
- [Can I use R.swift in a library?](Documentation/QandA.md#can-i-use-rswift-in-a-library)
- [How does R.swift work?](Documentation/QandA.md#how-does-rswift-work)
- [How to upgrade to a new major version?](Documentation/Migration.md)

Expand Down

0 comments on commit 272d431

Please sign in to comment.