mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Add an example project which tests Carthage build
This commit is contained in:
36
examples/CarthageBuildTest/CarthageExample/ViewController.m
Normal file
36
examples/CarthageBuildTest/CarthageExample/ViewController.m
Normal file
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// ViewController.m
|
||||
// CarthageExample
|
||||
//
|
||||
// Created by Engin Kurutepe on 23/02/16.
|
||||
// Copyright © 2016 Engin Kurutepe. All rights reserved.
|
||||
//
|
||||
|
||||
@import AsyncDisplayKit;
|
||||
|
||||
#import "ViewController.h"
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
CGSize screenSize = self.view.bounds.size;
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
ASTextNode *node = [[ASTextNode alloc] init];
|
||||
node.attributedString = [[NSAttributedString alloc] initWithString:@"hello world"];
|
||||
[node measure:(CGSize){.width = screenSize.width, .height = CGFLOAT_MAX}];
|
||||
node.frame = (CGRect) {.origin = (CGPoint){.x = 100, .y = 100}, .size = node.calculatedSize };
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.view addSubview:node.view];
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user