To see the full effect __kindof, I would recommend just using it and looking at different results:
NSMutableArray<UIView *> *views;
NSMutableArray<__kindof UIView *> *subviews;
views = [NSMutableArray new];
subviews = [NSMutableArray new];
UIView *someView = [UIView new];
[subviews addObject:someView];
[views addObject:someView];
UIButton *someSubview = [UIButton new];
[subviews addObject:someSubview];
[views addObject:someSubview];
So far for insertion into different shared arrays. Both compile and work just fine. No warnings, no crashes.
, , - - , UIView*, UIButton*
UIView *extView00 = views[0];
UIView *extView01 = subviews[0];
UIView *extView10 = views[1];
UIView *extView11 = subviews[1];
UIButton *extButton00 = views[0]; <-- warning
UIButton *extButton01 = subviews[0];
UIButton *extButton10 = views[1]; <-- warning
UIButton *extButton11 = subviews[1];
, :
, 'UIButton *' 'UIView *'
, . , , . - : extButton01 UIView*, UIButton*.
NSLog(@"%@", extButton00.titleLabel);
NSLog(@"%@", extButton01.titleLabel);
NSLog(@"%@", extButton10.titleLabel);
NSLog(@"%@", extButton11.titleLabel);
, , . views, , . , . , , . .
, . . 100% , X T, subviews __kindof.
, , .