shared development in swift

Asked 2 years ago, Updated 2 years ago, 89 views

I'm thinking of sharing the development work at Swift.

A: Screen 1-3 (created on storyboard)
B: Screen 4-6 (created on storyboard)
C: Screen 7-9 (created on storyboard)

As shown in , we consider the storyboard screen and the class file (.swift) file on that screen as their respective responsibilities, and the processing across other responsibilities is after the merge process.

Development is complete, and when I try to combine them, the screen on the storyboard is copied &
Unable to paste.Even if it is possible, I am not sure if the IBOutlet of the class file (.swift) connected from each screen will be linked.

In general, what do you do when you share and develop?

swift xcode storyboard

2022-09-30 20:25

1 Answers

This is my first answer. I'm sorry if it's far from what I asked.

In general, what do you do when you share and develop?

There are two types of development: development using storyboard and development without use (coding UI).
They can be used differently depending on the size of the project and the complexity of the UI.
Also, I think it is common for development using storyboard to divide Storyboard files and avoid enlargement.

As a prerequisite, I think that the members need to match the configuration using AutoLayout and the version of StoryBoard.

Basically, even if multiple workers use the same StoryBoard, you can automatically merge by pulling from the XCode.

If you conflict, the contents of the StoryBoard file are XML, so you may have to modify it directly.If the layout is worn out, the layout will collapse and the situation will be restored to COMMIT at some point, but the following measures can be taken to avoid this situation.(It's only a part)

  • Reduce the granularity of COMMIT
    Reduce the number of changes to the StoryBoard by a single COMMIT and ensure that there are no problems as appropriate

  • Divide StoryBoard
    ex)
    Set the layout between A and B to C to StoryBoard1
    D-E-F layout as StoryBoard 2

    If you switch between StoryBoard, you will need to read the StoryBoard in code and pass it to the ViewController.

Reduce the granularity of COMMIT
Reduce the number of changes to the StoryBoard by a single COMMIT and ensure that there are no problems as appropriate

Split StoryBoard
ex)
Set the layout between A and B to C to StoryBoard1
D-E-F layout as StoryBoard 2

If you switch between StoryBoard, you will need to read the StoryBoard in the code and pass it to the ViewController.


2022-09-30 20:25

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.