In Objective-c I would declare it like this
@protocol Protocol1
@end
@property (nonatomic, strong) UIViewController<Protocol1> property1;
How Can I declare property1 in Swift?
In Objective-c I would declare it like this
@protocol Protocol1
@end
@property (nonatomic, strong) UIViewController<Protocol1> property1;
How Can I declare property1 in Swift?
You might do something like that
class YourType: UIViewController, Protocol1 {}
var yourVar: YourType
Although it's a kind of hacky solution...
This could be even worse, still I am gonna add it
class YourClass<T:UIViewController, Protocol1> {
var property1: T?
}