I want to use a method as described here iOS different constraints for different devices to resize my constraints according to the iPhone model. Out of the answers given the one that was marked with a tick implemented something called a resolution group. In my code I wrote it like this:
public func getResolutionGroup() -> ResolutionGroup? {
switch self {
case .iPhone6, .iPhone7, .iPhone8:
return .lr320x568
case .iPhone6Plus, .iPhone7Plus, .iPhone8Plus
return .lr414x735
default:
return .lr320x568
}
}
When I tried to use it however it says that ResolutionGroup is undeclared. The person who gave the answer did not state how he implemented. Is it something that's built in xcode or is it something I need to import from github?