Problem I implemented an extension for the NSManagedObjectContext that takes any CoreData class as a parameter and performs a fetch […]
Tag: swift3
Quickselect algorithm in Swift
Problem I recently answered a question on Stack Overflow about finding the k-largest element in an array, and present my […]
Prevent a UITextField from being input with aphabetic characters
Problem The goal is to disallow typing alphabetic characters as input in a UITextField. Please tell me if this approach […]
Transformations an array, combination of between map and reduce
Problem I’m working on a function that reduces pairs of elements if they meet some criteria. For example, given an […]
Singleton class with custom initializer
Problem In a Swift project, I have a class should be used as a singleton: class NearFieldManager : NSObject{ static […]
Swift UITableViewCell class to show cameras, ratings for a car wash and other information
Problem I have an UITableViewCell class that written in Swift. And it seems to me that I did it the […]
Tableview Subclass implementing delegate datasource
Problem I have two view controllers which have same tableview. One is for Post and one is for Profile, which […]
Grouping models without dictionary
Problem I want to group an array of structs only using arrays into an array of new structs. In this […]
Switching between queues in cellForIndexPath method
Problem My tableView is scrolling very slowly because there is a fetch request done in every cellForIndexPath method. I have […]
How can I clean my swift code [closed]
Problem Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add […]
- 1
- 2