Merge commit '7621e2f8dec938cf48181c8b10afc9b01f444e68' into beta

This commit is contained in:
Ilya Laktyushin
2025-12-06 02:17:48 +04:00
commit 8344b97e03
28070 changed files with 7995182 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
#import "TGNeoViewModel.h"
@interface TGNeoViewModel ()
{
NSMutableArray *_submodels;
}
@end
@implementation TGNeoViewModel
- (instancetype)init
{
self = [super init];
if (self != nil)
{
_submodels = [[NSMutableArray alloc] init];
}
return self;
}
- (CGRect)bounds
{
return CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
}
- (NSArray *)submodels
{
return _submodels;
}
- (void)addSubmodel:(TGNeoViewModel *)viewModel
{
[_submodels addObject:viewModel];
}
- (void)removeSubmodel:(TGNeoViewModel *)viewModel
{
[_submodels removeObject:viewModel];
}
- (void)drawInContext:(CGContextRef)context
{
[self drawSubmodelsInContext:context];
}
- (void)drawSubmodelsInContext:(CGContextRef)context
{
for (TGNeoViewModel *submodel in self.submodels)
{
CGContextTranslateCTM(context, submodel.frame.origin.x, submodel.frame.origin.y);
[submodel drawInContext:context];
CGContextTranslateCTM(context, -submodel.frame.origin.x, -submodel.frame.origin.y);
}
}
- (CGSize)contentSizeWithContainerSize:(CGSize)containerSize
{
return CGSizeZero;
}
@end