Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mac-cain13 committed Jul 20, 2015
2 parents 11087ed + c034b7d commit c228d3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions R.swift.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "R.swift"
s.version = "0.8.2"
s.version = "0.8.3"
s.summary = "Use strong typed, autocompleted resources like images and segues in Swift"

s.description = <<-DESC
Expand All @@ -22,7 +22,7 @@ Pod::Spec.new do |s|

s.platform = :ios, "7.0"

s.source = { :http => "https://github.com/mac-cain13/R.swift/releases/download/v0.8.2/rswift-0.8.2.zip" }
s.source = { :http => "https://github.com/mac-cain13/R.swift/releases/download/v0.8.3/rswift-0.8.3.zip" }

s.preserve_paths = "rswift"

Expand Down
7 changes: 4 additions & 3 deletions R.swift/values.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ let ReuseIdentifierUITableViewExtension = Extension(
generics: "T : \(Type._UITableViewCell)",
parameters: [
Function.Parameter(name: "identifier", type: ReuseIdentifier.type),
Function.Parameter(name: "forIndexPath", localName: "indexPath", type: Type._NSIndexPath.asOptional(), defaultValue: "nil")
Function.Parameter(name: "forIndexPath", localName: "indexPath", type: Type._NSIndexPath.asOptional())
],
returnType: Type(name: "T", genericType: nil, optional: true),
body: "if let indexPath = indexPath {\n return dequeueReusableCellWithIdentifier(identifier.identifier, forIndexPath: indexPath) as? T\n}\nreturn dequeueReusableCellWithIdentifier(identifier.identifier) as? T"
Expand Down Expand Up @@ -195,10 +195,11 @@ let ReuseIdentifierUICollectionViewExtension = Extension(
name: "registerNibs",
generics: "T: \(NibResourceProtocol.type) where T: \(ReusableProtocol.type), T.T: UICollectionReusableView",
parameters: [
Function.Parameter(name: "nibResources", type: Type(name: "[T]"))
Function.Parameter(name: "nibResources", type: Type(name: "[T]")),
Function.Parameter(name: "forSupplementaryViewOfKind", localName: "kind", type: Type._String)
],
returnType: Type._Void,
body: "nibResources.map(registerNib)"
body: "nibResources.map { self.registerNib($0, forSupplementaryViewOfKind: kind) }"
),
]
)
Expand Down

0 comments on commit c228d3e

Please sign in to comment.