mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 17:43:18 +00:00
Added a sample project that will demonstrate how to manually display nodes. Removed the UIWindow hack that coupled display of nodes with Core Animation transactions.
47 lines
1.2 KiB
Objective-C
47 lines
1.2 KiB
Objective-C
/* This file provided by Facebook is for non-commercial testing and evaluation
|
|
* purposes only. Facebook reserves all rights not expressly granted.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
#import "CheapController.h"
|
|
|
|
@interface CheapController ()
|
|
{
|
|
UILabel *_cheapLabel;
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation CheapController
|
|
|
|
- (instancetype)init
|
|
{
|
|
if (self = [super init]) {
|
|
_cheapLabel = [[UILabel alloc] init];
|
|
_cheapLabel.text = @"I'm a cheap date.";
|
|
[_cheapLabel sizeToFit];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)viewDidLoad
|
|
{
|
|
[super viewDidLoad];
|
|
|
|
self.view.backgroundColor = [UIColor whiteColor];
|
|
[self.view addSubview:_cheapLabel];
|
|
}
|
|
|
|
- (void)viewDidLayoutSubviews
|
|
{
|
|
_cheapLabel.center = CGPointMake(CGRectGetMidX(self.view.bounds), CGRectGetMidY(self.view.bounds));
|
|
}
|
|
|
|
@end
|