Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

[refactor] Refactor Cell reuse identifiers #42

Closed
ChoiysApple opened this issue Oct 5, 2023 · 0 comments · Fixed by #56
Closed

[refactor] Refactor Cell reuse identifiers #42

ChoiysApple opened this issue Oct 5, 2023 · 0 comments · Fixed by #56
Assignees
Labels
♻️ Refactor Refactoring required 🧑‍💻 Developer Experience Improve developer experience.
Milestone

Comments

@ChoiysApple
Copy link
Owner

ChoiysApple commented Oct 5, 2023

Situation

Cell identifiers are now managed as constant property.
There's room for improvement using Protocol or Generics

Reference

@ChoiysApple ChoiysApple added the ♻️ Refactor Refactoring required label Oct 5, 2023
@ChoiysApple ChoiysApple added the 🧑‍💻 Developer Experience Improve developer experience. label Oct 16, 2023
@ChoiysApple ChoiysApple added this to the 0.1.1 milestone Nov 21, 2023
ChoiysApple added a commit that referenced this issue Nov 22, 2023
- Remake folders as Application, Presentation, Domain, Resources
- Extract use-case code from APIService.swift into MovieAPI.swift
- Rename Extension.swift to StyleExtensions.swift (Need to rework in future)
- Rename Constants.swift to Identifiers.swift (Need to remove after issue #42)
ChoiysApple added a commit that referenced this issue Nov 22, 2023
### Describe
Reorganize file structure using example of [Template iOS App using Clean
Architecture and
MVVM](https://github.com/kudoleh/iOS-Clean-Architecture-MVVM)

### Changes Made
1. Reorganize file structure
    - Remake folders as Application, Presentation, Domain, Resources
    - Extract use-case code from APIService.swift into MovieAPI.swift
- Rename Extension.swift to StyleExtensions.swift (Need to rework in
future)
- Rename Constants.swift to Identifiers.swift (Need to remove after
issue [#42](#42))

2. Remove Main.storyboard
    - Delete Main.storyboard
    - Add Root ViewController to window at SceneDelegate method
    - Delete UISceneStoryboardFile property from info.plist

### Issues Resolved
- #33 

### Additional context
`Constants.swift` renamed to `Identifiers.swift` but need to **remove**
after issue [#42](#42))

close #33
@ChoiysApple ChoiysApple self-assigned this Nov 22, 2023
@ChoiysApple ChoiysApple linked a pull request Dec 4, 2023 that will close this issue
ChoiysApple added a commit that referenced this issue Dec 4, 2023
<!--- 
Pull Request title must contains Category, issue number, issue
description
(e.g. "[Feature] #123 Adding new Gestures")
-->

### Describe
`UITableView` `UICollectionView` reuse identifier refactoring

### Changes Made
- Delete `Identifiers.swift`
- Create `ReusableCell` Protocol and Extensions for `UITableView` and
`UICollectionView`
- Replace cell registration and reusing

### Issues Resolved
- #42 

### Additional context
About cells in `CreditViewController`
- UITableView is using 2 UITableViewCell: (default `UITableViewCell` and
`CreditTableViewDescriptionCell`)
- Needed to create `CreditTableViewCell` to replace default
`UITableView`
- `CreditTableViewDescriptionCell` is not registered or reused, so there
was some refactoring

### References
[iOS Cell Registration and Reusing with Swift Protocol Extensions and
Generics](https://medium.com/@gonzalezreal/ios-cell-registration-reusing-with-swift-protocol-extensions-and-generics-c5ac4fb5b75e)
[Nicer reuse identifiers with protocols in
Swift](https://medium.com/bleeding-edge/nicer-reuse-identifiers-with-protocols-in-swift-97d18de1b2df)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
♻️ Refactor Refactoring required 🧑‍💻 Developer Experience Improve developer experience.
Projects
No open projects
Status: Deployed
Development

Successfully merging a pull request may close this issue.

1 participant