Skip to content

Commit cf0dca8

Browse files
committed
Fix layouts and add links
1 parent 3b0d641 commit cf0dca8

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Here's list of Swift tips & tricks with all additional sources (playgrounds, ima
88

99
## 📃 Table of contents
1010

11-
[#63 How to make `UIStoryboard` usage safer?]()<br />
12-
[#62 "Massive" Storyboard]()<br />
13-
[#61 `XCTUnwrap` assertion function]()<br />
14-
[#60 `UITableViewCell` identifier]()<br />
11+
[#63 How to make `UIStoryboard` usage safer?](https://github.com/Luur/SwiftTips#63-how-to-make-uistoryboard-usage-safer)<br />
12+
[#62 "Massive" Storyboard](https://github.com/Luur/SwiftTips#62-massive-storyboard)<br />
13+
[#61 `XCTUnwrap` assertion function](https://github.com/Luur/SwiftTips#61-xctunwrap-assertion-function)<br />
14+
[#60 `UITableViewCell` identifier](https://github.com/Luur/SwiftTips#60-uitableviewcell-identifier)<br />
1515
[#59 `AlertPresentable` protocol](https://github.com/Luur/SwiftTips#59-alertpresentable-protocol)<br />
1616
[#58 CollectionView extension for adaptive grid layout](https://github.com/Luur/SwiftTips#58-collectionview-extension-for-adaptive-grid-layout)<br />
1717
[#57 Render HTML within a `UILabel`](https://github.com/Luur/SwiftTips#57-render-html-within-a-uilabel)<br />
@@ -76,14 +76,14 @@ Here's list of Swift tips & tricks with all additional sources (playgrounds, ima
7676

7777
Below I want to show you a few simple ways how to make usage of string literals connected with `UIStoryboard` much more safer.
7878

79-
* Global constant string literals
79+
* Global constant string literals<br />
8080
At first it sounds like a good idea. You only need to define the constant once and it will be available everywhere. Then if you want to change its value, there is only one place in code to change for which the effects will cascade throughout the project.
8181
But global constants have some disadvantages. Not as much as global variables but still enought to stop using them. It's not the best practice. I will cover the topic of andvatages and disadavntages of global constants/variables usage in my next posts.
8282

83-
* Relatable storyboard names
83+
* Relatable storyboard names<br />
8484
Your storyboards should be named after the sections of which they cover. It's a general rule. If you have a storyboard which houses view controllers are related to Profile, then the name of that storyboard’s file should be `Profile.storyboard`.
8585

86-
* Uniform storyboard identifiers
86+
* Uniform storyboard identifiers<br />
8787
When you want to use `Storyboard Identifiers` on your view controllers, usage of the class names as identifiers will be a good practice. For example, “ProfileViewController” would be the identifier for ProfuleViewController. Adding this to your naming convention is a good idea.
8888

8989
* Enum
@@ -122,6 +122,7 @@ I'm prety sure that almost every one has heard about "main" MVC problem known as
122122
Let's list main storyboard problems:
123123

124124
* Storyboard always become unwieldy and unmanageable.
125+
125126
![](../master/Sources/62/img.png)
126127

127128
* Storyboard is slow. Extremely slow. As it grows in size, it doesn't only become unhandy for developers but also for XCode. Once you tap on a storyboard file of this size, you can leave your seat, grab a cup of coffee and come back. You’ll be lucky if XCode has loaded the storyboard.
@@ -137,8 +138,6 @@ Storyboard can be easily splitted into multiple storyboards, with each one repre
137138

138139
Also don't forget about Storyboard References introduced in iOS 9.
139140

140-
![](../master/Sources/62/img2.png)
141-
142141
**But splitting storyboard will not help with one serious problem.** Storyboard usage has strong coupling with one silent killer known as `String Literals`. Look for the solution in [#63 `StoryboardIdentifiable` protocol]()
143142

144143
Back to [Top](https://github.com/Luur/SwiftTips#-table-of-contents)

Sources/62/img1.png

-465 KB
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)