Tag: UIKit
-
Clean Architecture with NSFetchedResultsController
Probably the NSFetchedResutlsController makes the tightest coupling between UI and another layers of an iOS application. NSFetchedResutlsController Class has been created by Apple to provide a seamless data flow from Core Data layer to UIKit and vice a versa. The MVC is Apple’s native architecture and NSFetchedResultsController lays in the Model layer of this architecture…
-
iOS, How to check if the device is locked or unlocked programmatically
Sometimes it is really necessary to know the device lock state especially when we are working with background services like Bluetooth or networking. Actually, iOS API does not let developers check if the device is locked or unlocked programmatically. But there is a workaround that lets us find it out with some seconds of delay…
-
UITableView Selected Cell Background Color
It is easy to change the background color of the selected cell in a table view. Each UITableViewCell has a selectedBackgroundView which is shown when the cell is selected. This view should be set programmatically and it’s better to do that in a UITableViewCell custom class.