mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-06 21:22:44 +00:00
typo and comment
This commit is contained in:
@@ -52,6 +52,10 @@
|
||||
- (void)dealloc
|
||||
{
|
||||
if (_traitColectionContext != nil) {
|
||||
// The setter will iterate through the VC's subnodes and replace the traitCollectionContext in their ASEnvironmentTraitCollection with nil.
|
||||
// Since the VC holds the only strong reference to this context and we are in the process of destroying
|
||||
// the VC, all the references in the subnodes will be unsafe unless we nil them out. More than likely all the subnodes will be dealloc'ed
|
||||
// as part of the VC being dealloc'ed, but this is just to make extra sure.
|
||||
self.traitColectionContext = nil;
|
||||
}
|
||||
}
|
||||
@@ -158,7 +162,7 @@
|
||||
{
|
||||
if (self.overrideDisplayTraitsWithTraitCollection) {
|
||||
ASTraitCollection *asyncTraitCollection = self.overrideDisplayTraitsWithTraitCollection(traitCollection);
|
||||
self.traitColectionContext = asyncTraitCollection.traitColectionContext;
|
||||
self.traitColectionContext = asyncTraitCollection.traitCollectionContext;
|
||||
return [asyncTraitCollection environmentTraitCollection];
|
||||
}
|
||||
|
||||
@@ -171,7 +175,7 @@
|
||||
{
|
||||
if (self.overrideDisplayTraitsWithWindowSize) {
|
||||
ASTraitCollection *traitCollection = self.overrideDisplayTraitsWithWindowSize(windowSize);
|
||||
self.traitColectionContext = traitCollection.traitColectionContext;
|
||||
self.traitColectionContext = traitCollection.traitCollectionContext;
|
||||
return [traitCollection environmentTraitCollection];
|
||||
}
|
||||
return self.node.environmentTraitCollection;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* This makes sure that the VC is the owner of the context and ASEnvironmentTraitCollections will not
|
||||
* have a reference to a dangling pointer.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) id traitColectionContext;
|
||||
@property (nonatomic, strong, readonly) id traitCollectionContext;
|
||||
|
||||
|
||||
+ (ASTraitCollection *)traitCollectionWithASEnvironmentTraitCollection:(ASEnvironmentTraitCollection)traits;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
_horizontalSizeClass = horizontalSizeClass;
|
||||
_verticalSizeClass = verticalSizeClass;
|
||||
_forceTouchCapability = forceTouchCapability;
|
||||
_traitColectionContext = traitCollectionContext;
|
||||
_traitCollectionContext = traitCollectionContext;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -91,7 +91,7 @@
|
||||
.userInterfaceIdiom = self.userInterfaceIdiom,
|
||||
.verticalSizeClass = self.verticalSizeClass,
|
||||
.forceTouchCapability = self.forceTouchCapability,
|
||||
.displayContext = self.traitColectionContext,
|
||||
.displayContext = self.traitCollectionContext,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user