Skip to content

Commit

Permalink
when validating images in nibs, pass in R.hostingBundle as the bundle…
Browse files Browse the repository at this point in the history
… so the main bundle isn't used by default
  • Loading branch information
Blair McArthur committed Jan 4, 2017
1 parent 9682509 commit 7cae5c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R.swift/Generators/NibStructGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ struct NibStructGenerator: StructGenerator {
// Validation
let validateImagesLines = Set(nib.usedImageIdentifiers)
.map {
"if UIKit.UIImage(named: \"\($0)\") == nil { throw Rswift.ValidationError(description: \"[R.swift] Image named '\($0)' is used in nib '\(nib.name)', but couldn't be loaded.\") }"
"if UIKit.UIImage(named: \"\($0)\", in: R.hostingBundle, compatibleWith: nil) == nil { throw Rswift.ValidationError(description: \"[R.swift] Image named '\($0)' is used in nib '\(nib.name)', but couldn't be loaded.\") }"
}

var validateFunctions: [Function] = []
Expand Down

0 comments on commit 7cae5c3

Please sign in to comment.