在UIStoryboardSegue
类中,属性sourceViewController
显然是 a UIViewController
。为什么 Apple 将此属性标记为id
?
@property(nonatomic, readonly) id sourceViewController;
@property(nonatomic, readonly) id destinationViewController;
使用或理解使用会不会更容易UIViewController *
,比如
@property(nonatomic, readonly) UIViewController *sourceViewController;
@property(nonatomic, readonly) UIViewController *destinationViewController;