You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -547,7 +548,7 @@ result = a > b ? x = c > d ? c : d : y;
547
548
548
549
## Init Methods
549
550
550
-
Init methods should follow the convention provided by Apple's generated code template. A return type of 'instancetype' should also be used instead of 'id'.
551
+
Init methods should follow the convention provided by Apple's generated code template. A return type of 'instancetype' should also be used instead of 'id'.
551
552
552
553
```objc
553
554
- (instancetype)init {
@@ -559,6 +560,16 @@ Init methods should follow the convention provided by Apple's generated code tem
559
560
}
560
561
```
561
562
563
+
## Class Constructor Methods
564
+
565
+
Where Class constructor methods are used, these should __always__ return type of 'instancetype' and ___never___ 'id'. This ensures the compiler correctly infers the result type.
0 commit comments