|
3 | 3 |
|
4 | 4 | In this project, I have collected various best practices and iOS development tips. This is my personal development assistant. |
5 | 5 |
|
| 6 | +## Index |
| 7 | + |
6 | 8 | - [**Clean Code**](#clean-code) |
7 | 9 | - [Clean Class](#clean-class) |
8 | 10 | - [Life Cycle](#life-cycle) |
@@ -373,7 +375,6 @@ The main MARKs for splitting the code into logically related blocks and their se |
373 | 375 |
|
374 | 376 | ## **Protocols** |
375 | 377 |
|
376 | | - |
377 | 378 | ### [CustomStringConvertible](https://github.com/lgreydev/Help/blob/master/Help/Protocols/CustomStringConvertible.swift) |
378 | 379 | A type with a customized textual representation. |
379 | 380 | Types that conform to the CustomStringConvertible protocol can provide their own representation to be used when converting an instance to a string. The String(describing:) initializer is the preferred way to convert an instance of any type to a string. If the passed instance conforms to CustomStringConvertible, the String(describing:) initializer and the print(_:) function use the instance’s custom description property. Accessing a type’s description property directly or using CustomStringConvertible as a generic constraint is discouraged. |
@@ -458,10 +459,12 @@ mike > bob // true |
458 | 459 |
|
459 | 460 | ``` |
460 | 461 |
|
| 462 | +**[⬆ Back to Index](#index)** |
461 | 463 |
|
462 | | -## **Extensions** |
463 | 464 |
|
464 | 465 |
|
| 466 | +## **Extensions** |
| 467 | + |
465 | 468 | ### [IntᐩRandom](https://github.com/lgreydev/Help/blob/master/Help/Extensions/Int+Random.swift) |
466 | 469 | An extension for Int that returns a random number works with range of numbers. Negative numbers converts to positive. |
467 | 470 | - **Example:** 17.random will return 0 to 17 (not including 17). |
@@ -514,6 +517,9 @@ extension String { |
514 | 517 |
|
515 | 518 | ``` |
516 | 519 |
|
| 520 | +**[⬆ Back to Index](#index)** |
| 521 | + |
| 522 | + |
517 | 523 |
|
518 | 524 | ## **Working Code** |
519 | 525 |
|
@@ -595,7 +601,6 @@ safari.getImage(text: "page 3") |
595 | 601 |
|
596 | 602 |
|
597 | 603 |
|
598 | | - |
599 | 604 | ### [Type Casting](https://github.com/lgreydev/Help/blob/master/Help/WorkingCode/TypeCasting.swift) |
600 | 605 | Type casting is a way to check the type of an instance, or to treat that instance as a different superclass or subclass from somewhere else in its own class hierarchy. |
601 | 606 |
|
@@ -884,6 +889,8 @@ showTower(for: difficulty ?? .unknown) |
884 | 889 |
|
885 | 890 | ``` |
886 | 891 |
|
| 892 | +**[⬆ Back to Index](#index)** |
| 893 | + |
887 | 894 |
|
888 | 895 |
|
889 | 896 | ## **UIKit** |
@@ -954,6 +961,10 @@ class SameObject: Codable { |
954 | 961 |
|
955 | 962 | ``` |
956 | 963 |
|
| 964 | +**[⬆ Back to Index](#index)** |
| 965 | + |
| 966 | + |
| 967 | + |
957 | 968 | ## Table View |
958 | 969 |
|
959 | 970 | ### [Move Row](https://github.com/lgreydev/Help/blob/master/Help/UIKit/TableView/MoveRow.swift) |
@@ -1216,6 +1227,9 @@ class SecondViewController: UIViewController { |
1216 | 1227 |
|
1217 | 1228 | ``` |
1218 | 1229 |
|
| 1230 | +**[⬆ Back to Index](#index)** |
| 1231 | +
|
| 1232 | +
|
1219 | 1233 |
|
1220 | 1234 | ## **Features** |
1221 | 1235 |
|
@@ -1360,13 +1374,13 @@ private func respondToSwipeGesture(gesture: UIGestureRecognizer) { |
1360 | 1374 |
|
1361 | 1375 | ``` |
1362 | 1376 |
|
| 1377 | +**[⬆ Back to Index](#index)** |
| 1378 | +
|
1363 | 1379 |
|
1364 | 1380 |
|
1365 | 1381 | ## **Design Patterns** |
1366 | 1382 | [Book Design Patterns](https://en.wikipedia.org/wiki/Design_Patterns) |
1367 | 1383 |
|
1368 | | -
|
1369 | | -
|
1370 | 1384 | ### [Factory Method](https://github.com/lgreydev/Help/blob/master/Help/DesignPatterns/FactoryMethod.swift) |
1371 | 1385 | [Factory Method RU](https://refactoring.guru/ru/design-patterns/factory-method) |
1372 | 1386 |
|
@@ -1450,11 +1464,11 @@ class SomeViewController: UIViewController { |
1450 | 1464 |
|
1451 | 1465 | ``` |
1452 | 1466 |
|
| 1467 | +**[⬆ Back to Index](#index)** |
1453 | 1468 |
|
1454 | 1469 |
|
1455 | | -## **Leet Code** |
1456 | | -
|
1457 | 1470 |
|
| 1471 | +## **Leet Code** |
1458 | 1472 |
|
1459 | 1473 | ### [Pascal Triangle](https://github.com/lgreydev/Help/blob/master/Help/LeetCode/Pascal'sTriangle.swift) |
1460 | 1474 | |
|
0 commit comments