mac-cain13 / R.swift

Strong typed, autocompleted resources like images, fonts and segues in Swift projects
MIT License
9.49k stars 763 forks source link

Don't create functions on Xcode 15.3 #901

Closed Yaozitao0322 closed 1 week ago

Yaozitao0322 commented 2 months ago

R.generated have source functions on old Xcode. but not methods in new project. next is old project. image

next id new project. image image

tomlokhorst commented 2 weeks ago

Yes, the generated code has changed between R.swift 6 and R.swift 7.

But the way you use that code hasn’t changed.

You can still call R.image.home_top_background() on the ImageResource. It implements callAsFunction and will return an optional UIImage.