How do You structure an iPhone Xcode project?

前端 未结 3 1087
面向向阳花
面向向阳花 2021-01-30 02:38

What are good ways of building groups/folders?

I\'ve tried by feature (UI for a feature plus model etc) with a common group. I\'ve also tried by UI, model, etc.

3条回答
  •  悲哀的现实
    2021-01-30 02:59

    The standard Xcode MVC folder structure is as follows.

    1. CoreData : Contains DataModel and Entity Classes.

    2. Extension : Contain One class(default apple class extensions+project class extensions.)

    3. Helper: Contain Third Party classes/Frameworks (eg. SWRevealController) + Bridging classes (eg. Obj C class in Swift based project)

    4. Model : Make a singleton class (eg.AppModel - NSArray,NSDictionary, String etc.) for saving data. The Web Service Response parsing and storing data is also done here.

    5. Services : Contain Web Service processes (eg. Login Verification, HTTP Request/Response)

    6. View : Contain storyboard, LaunchScreen.XIB and View Classes. Make a sub folder Cells - contain UITableViewCell, UICollectionViewCell etc.

    7. Controller: Contain Logic or Code related to UIElements (eg. UIButton’s reference+ clicked action)

提交回复
热议问题