Choose names for models of data items deliberately. Think about whether the name describes the object as a whole or only some part of it. For example, a user account is not the user himself, but part of it. #data#datamodel#dataitemmodel#naming#composition
To show some long-lasting action after touching `UIButton`, we can simply set the `alpha` value of its `titleLabel` to `0.0` and add `UIActivityIndicatorView` on top of it. #ios#loading#progress#activity#button#indicator
During development Core Data model, do not forget to create fetch indexes for your fetch requests. This will greatly improve the performance of the app. See for yourself with `https://t.co/U9kGJRVq7S.CoreData.SQLDebug` tool. #coredata#performance
In case you need to use the `drawViewHierarchyInRect:afterScreenUpdates:` method, and the target view is not visible, temporarily move it to the second window, which is off the screen. Without doing this, you risk getting an exception. #nonvisible#uiview#hierarchy#snapshot
“Brevity in Swift code, where it occurs, is a side-effect of the strong type system and features that naturally reduce boilerplate.” - Apple Inc. So, prefer to include in the names of variables and methods all the words needed to avoid ambiguity. #swift#naming#convention
If the actual value of the property is `nil`, the `DataController` should not return a default value, but `nil`. And the `ViewController`, in turn, must have access to both of these values and decide which one to use. #datacontroller#viewcontroller#data#defaultvalue
Prefer to use the following mapping for JSON: 1) field is included and 1.1) not equal to `null` - update the value of the property; 1.2) equal to `null` - set the value to `nil` / remove associated object; 2) field is not included - do not update the value. #swift#data#model
Often an application has objects, such as a data stack, that need to be shared and accessible from different places. They can only be implemented with reference types. So do not try to get rid of classes. #ios#swift#controllers#class#model#struct
`performBatchUpdates(_:completion:)` must be initiated by only one data source. If you need to update `UITableViewCell` / `UICollectionViewCell` regardless of the data source, fetch it and update it manually. #uitableview#uicollectionview#performbatchupdates#datasource
There are two main types of data that you should think about first when designing a user interface - base data, such as `https://t.co/6G1UlGr2Xl`, and derived data, such as `userNameLabel.attributedText`, which represent their appearance on the screen. #ui#data#base#derived
Start designing a view by defining its dependencies. `InquiryViewPresentation(messageOrQuestion:userName:)` / `InquiryViewLayout(viewPresentation:keyboardFrame:size:)` #view#presentation#layout#dependencies
To use `_printHierarchy` or `recursiveDescription` in LLDB from Swift, just explicitly specify the language for the expression. `expr -l objc++ -O -- [UIViewController _printHierarchy]` / `expr -l objc++ -O -- [0x145d44b50 recursiveDescription]` #swift#ui#debugging#lldb