Skip to content

iOS (MVC Design pattern)#42

Open
saeedCodium wants to merge 9 commits intoC0D1UM:mainfrom
saeedCodium:iOS
Open

iOS (MVC Design pattern)#42
saeedCodium wants to merge 9 commits intoC0D1UM:mainfrom
saeedCodium:iOS

Conversation

@saeedCodium
Copy link
Copy Markdown

MVC Design pattern explained . how to implement the MVC Design pattern correctly

@earthpyy earthpyy enabled auto-merge June 4, 2021 09:15
@earthpyy
Copy link
Copy Markdown
Member

earthpyy commented Jun 4, 2021

@saeedCodium Hello, could you please remove .DS_Store files krubb?

@saeedCodium
Copy link
Copy Markdown
Author

saeedCodium commented Jun 4, 2021 via email

auto-merge was automatically disabled June 4, 2021 11:15

Head branch was pushed to by a user without write access

Copy link
Copy Markdown
Contributor

@piyapan039285 piyapan039285 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the content is good. Some sentences are too long to catch up. So I give you some sample how to break down into smaller topics.

Comment thread iOS/MVC/README.md Outdated
Comment thread iOS/MVC/README.md
Comment thread iOS/MVC/README.md Outdated
the easiest and fastest way to setting the constraints is using the AutoLayout part in the storyboard and xib files without need to set any constraints in the codes (some times you need to change the constraints run time and the size will set in the runtime as well so in that case you need to set the constraints in the storyboard or xib files and then drag that constraint to your code to change it run time)

### passing the data
to pass the data do not use `Notification Center` or `User Defaults`, you can use call back functions and delegate protocols instead . if you are using delegate protocols remember to make your delegates `weak`to avoid memory leaks. in some callback functions you need to use `weak` for avoiding the memory leaks problem. make sure every view controller which dismissed the `deinit` function executes in that class after dismissing. you can make some protocol functions optional to avoid using those functions in the other classes that you may use.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should break into small topics.

  1. Do not use Notification Center or User Defaults. You can use call back functions and delegate protocols instead
  2. If you are using delegate protocols remember to make your delegates weak to avoid memory leaks. in some callback functions you need to use weak for avoiding the memory leaks problem.
  3. Make sure every view controller which dismissed the deinit function executes in that class after dismissing. you can make some protocol functions optional to avoid using those functions in the other classes that you may use.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part explains how to pass the data , it doesn't contains separate parts .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. I just think that topic "pass the data" can be break down into smaller topics but it is ok to combine together.

Here is sample on apple documentation on how they break down topics:
image

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Comment thread iOS/MVC/README.md Outdated
some titles removed & some parts break into other parts
big parts broke up into small parts
@piyapan039285
Copy link
Copy Markdown
Contributor

image

Copy link
Copy Markdown
Contributor

@NorakGithub NorakGithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be able to show your content in the compiled website you will need to

  • Add ios section in _config.yml > header_pages
  • Rename iOS to ios directory
  • Create README.md in newly renamed ios directory
  • Add below content in the newly created README.md
---
 title: iOS
 has_sub_pages: true
 permalink: ios
 ---
  • Your MVC README should be in Architectures directory, since it's about application architecture

@earthpyy earthpyy enabled auto-merge June 29, 2021 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants