Fix more warnings

This commit is contained in:
Ali
2021-08-05 00:02:35 +02:00
parent c87725579d
commit 194f25d4e4
107 changed files with 620 additions and 909 deletions

View File

@@ -250,10 +250,7 @@ const CGFloat TGPhotoEditorToolsLandscapePanelSize = TGPhotoEditorToolsPanelSize
{
NSString *title = tool.title;
CGFloat width = 0.0f;
if ([title respondsToSelector:@selector(sizeWithAttributes:)])
width = CGCeil([title sizeWithAttributes:@{ NSFontAttributeName:[TGPhotoEditorInterfaceAssets editorItemTitleFont] }].width);
else
width = CGCeil([title sizeWithFont:[TGPhotoEditorInterfaceAssets editorItemTitleFont]].width);
width = CGCeil([title sizeWithAttributes:@{ NSFontAttributeName:[TGPhotoEditorInterfaceAssets editorItemTitleFont] }].width);
if (width > maxTitleWidth)
maxTitleWidth = width;
@@ -844,7 +841,10 @@ const CGFloat TGPhotoEditorToolsLandscapePanelSize = TGPhotoEditorToolsPanelSize
- (void)updateToolViews
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
UIInterfaceOrientation orientation = self.interfaceOrientation;
#pragma clang diagnostic pop
if ([self inFormSheet] || TGIsPad())
{
_landscapeToolsWrapperView.hidden = true;