From ddd5ff1f759b732a096e8f13f03d6ea292d01833 Mon Sep 17 00:00:00 2001 From: Eric Jensen Date: Wed, 9 Mar 2016 11:29:46 -0800 Subject: [PATCH] Correct spelling errors --- AsyncDisplayKit/ASCellNode.h | 4 ++-- AsyncDisplayKit/ASCollectionNode.h | 6 +++--- AsyncDisplayKit/ASCollectionView.h | 10 +++++----- AsyncDisplayKit/ASCollectionView.mm | 4 ++-- AsyncDisplayKit/ASContextTransitioning.h | 2 +- AsyncDisplayKit/ASControlNode.h | 2 +- AsyncDisplayKit/ASDisplayNode.mm | 8 ++++---- AsyncDisplayKit/ASDisplayNodeExtras.h | 6 +++--- AsyncDisplayKit/ASDisplayNodeExtras.mm | 4 ++-- AsyncDisplayKit/ASEditableTextNode.h | 2 +- AsyncDisplayKit/ASMultiplexImageNode.h | 4 ++-- AsyncDisplayKit/ASNetworkImageNode.h | 4 ++-- AsyncDisplayKit/ASTableView.h | 14 +++++++------- AsyncDisplayKit/ASTableView.mm | 2 +- AsyncDisplayKit/Details/ASBatchContext.h | 4 ++-- AsyncDisplayKit/Details/ASDataController.h | 2 +- AsyncDisplayKit/Details/ASDataController.mm | 6 +++--- AsyncDisplayKit/Details/ASRangeController.mm | 2 +- .../ASRangeControllerUpdateRangeProtocol+Beta.h | 2 +- .../Details/Transactions/_ASAsyncTransaction.h | 2 +- .../Details/Transactions/_ASAsyncTransaction.mm | 4 ++-- .../Transactions/_ASAsyncTransactionGroup.h | 2 +- AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm | 2 +- AsyncDisplayKit/Layout/ASLayout.h | 2 +- AsyncDisplayKit/Layout/ASLayoutOptions.h | 2 +- AsyncDisplayKit/Layout/ASLayoutOptionsPrivate.mm | 3 +-- AsyncDisplayKit/Layout/ASLayoutSpec.h | 4 ++-- AsyncDisplayKit/Layout/ASLayoutable.h | 2 +- .../Private/ASDisplayNode+AsyncDisplay.mm | 4 ++-- .../Private/ASDisplayNode+FrameworkPrivate.h | 10 +++++----- .../Private/ASDisplayNode+UIViewBridge.mm | 2 +- .../Private/ASStackBaselinePositionedLayout.mm | 4 ++-- AsyncDisplayKit/Private/ASWeakSet.m | 2 +- .../TextKit/ASTextKitCoreTextAdditions.h | 2 +- AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm | 2 +- 35 files changed, 68 insertions(+), 69 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index 6c3e5001cc..593f0ffcf4 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -51,7 +51,7 @@ typedef enum : NSUInteger { * * With this property set to YES, the main thread will be blocked until display is complete for * the cell. This is more similar to UIKit, and in fact makes AsyncDisplayKit scrolling visually - * indistinguishible from UIKit's, except being faster. + * indistinguishable from UIKit's, except being faster. * * Using this option does not eliminate all of the performance advantages of AsyncDisplayKit. * Normally, a cell has been preloading and is almost done when it reaches the screen, so the @@ -103,7 +103,7 @@ typedef enum : NSUInteger { * @param didLoadBlock The block that will be called after the view controller's view is loaded. * * @return An ASCellNode created using the root view of the view controller provided by the viewControllerBlock. - * The view controller's root view is resized to match the calcuated size produced during layout. + * The view controller's root view is resized to match the calculated size produced during layout. * */ - (instancetype)initWithViewControllerBlock:(ASDisplayNodeViewControllerBlock)viewControllerBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock; diff --git a/AsyncDisplayKit/ASCollectionNode.h b/AsyncDisplayKit/ASCollectionNode.h index 49ca3ffe5a..1a8a70d98b 100644 --- a/AsyncDisplayKit/ASCollectionNode.h +++ b/AsyncDisplayKit/ASCollectionNode.h @@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Tuning parameters for a range type in the specified mode. * - * @param rangeMode The range mode to get the runing parameters for. + * @param rangeMode The range mode to get the running parameters for. * @param rangeType The range type to get the tuning parameters for. * * @returns A tuning parameter value for the given range type in the given mode. @@ -63,10 +63,10 @@ NS_ASSUME_NONNULL_BEGIN - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType; /** - * Set the tuning parameters for a range type in the specigied mode. + * Set the tuning parameters for a range type in the specified mode. * * @param tuningParameters The tuning parameters to store for a range type. - * @param rangeMode The range mode to set the runing parameters for. + * @param rangeMode The range mode to set the running parameters for. * @param rangeType The range type to set the tuning parameters for. * * @see ASLayoutRangeMode diff --git a/AsyncDisplayKit/ASCollectionView.h b/AsyncDisplayKit/ASCollectionView.h index 8d1c909ad6..b3db9246b9 100644 --- a/AsyncDisplayKit/ASCollectionView.h +++ b/AsyncDisplayKit/ASCollectionView.h @@ -77,7 +77,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Tuning parameters for a range type in the specified mode. * - * @param rangeMode The range mode to get the runing parameters for. + * @param rangeMode The range mode to get the running parameters for. * @param rangeType The range type to get the tuning parameters for. * * @returns A tuning parameter value for the given range type in the given mode. @@ -88,10 +88,10 @@ NS_ASSUME_NONNULL_BEGIN - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType; /** - * Set the tuning parameters for a range type in the specigied mode. + * Set the tuning parameters for a range type in the specified mode. * * @param tuningParameters The tuning parameters to store for a range type. - * @param rangeMode The range mode to set the runing parameters for. + * @param rangeMode The range mode to set the running parameters for. * @param rangeType The range type to set the tuning parameters for. * * @see ASLayoutRangeMode @@ -396,7 +396,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Indicator to lock the data source for data fetching in async mode. - * We should not update the data source until the data source has been unlocked. Otherwise, it will incur data inconsistence or exception + * We should not update the data source until the data source has been unlocked. Otherwise, it will incur data inconsistency or exception * due to the data access in async mode. * * @param collectionView The sender. @@ -405,7 +405,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Indicator to unlock the data source for data fetching in async mode. - * We should not update the data source until the data source has been unlocked. Otherwise, it will incur data inconsistence or exception + * We should not update the data source until the data source has been unlocked. Otherwise, it will incur data inconsistency or exception * due to the data access in async mode. * * @param collectionView The sender. diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index a9c79acf1c..29ea2c46f7 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -656,8 +656,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; _ignoreMaxSizeChange = NO; } else { // This actually doesn't perform an animation, but prevents the transaction block from being processed in the - // data controller's prevent animation block that would interupt an interupted relayout happening in an animation block - // ie. ASCollectionView bounds change on rotation or mutl-tasking split view resize. + // data controller's prevent animation block that would interrupt an interrupted relayout happening in an animation block + // ie. ASCollectionView bounds change on rotation or multi-tasking split view resize. [self performBatchAnimated:YES updates:^{ [_dataController relayoutAllNodes]; } completion:nil]; diff --git a/AsyncDisplayKit/ASContextTransitioning.h b/AsyncDisplayKit/ASContextTransitioning.h index 694ab6bf83..037f9a64d3 100644 --- a/AsyncDisplayKit/ASContextTransitioning.h +++ b/AsyncDisplayKit/ASContextTransitioning.h @@ -14,7 +14,7 @@ extern NSString * const ASTransitionContextToLayoutKey; @protocol ASContextTransitioning /** - @abstreact Defines if the given transition is animated + @abstract Defines if the given transition is animated */ - (BOOL)isAnimated; diff --git a/AsyncDisplayKit/ASControlNode.h b/AsyncDisplayKit/ASControlNode.h index 9f5c37e343..4bac37ff22 100644 --- a/AsyncDisplayKit/ASControlNode.h +++ b/AsyncDisplayKit/ASControlNode.h @@ -38,7 +38,7 @@ typedef NS_OPTIONS(NSUInteger, ASControlState) { ASControlStateNormal = 0, ASControlStateHighlighted = 1 << 0, // used when ASControlNode isHighlighted is set ASControlStateDisabled = 1 << 1, - ASControlStateSelected = 1 << 2, // used when ASControlNode isSeleted is set + ASControlStateSelected = 1 << 2, // used when ASControlNode isSelected is set ASControlStateReserved = 0xFF000000 // flags reserved for internal framework use }; diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index d16479a5d5..093cd0ef5b 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -95,7 +95,7 @@ _ASPendingState *ASDisplayNodeGetPendingState(ASDisplayNode *node) } /** - * Returns ASDisplayNodeFlags for the givern class/instance. instance MAY BE NIL. + * Returns ASDisplayNodeFlags for the given class/instance. instance MAY BE NIL. * * @param c the class, required * @param instance the instance, which may be nil. (If so, the class is inspected instead) @@ -131,7 +131,7 @@ static struct ASDisplayNodeFlags GetASDisplayNodeFlags(Class c, ASDisplayNode *i /** * Returns ASDisplayNodeMethodOverrides for the given class * - * @param c the class, requireed. + * @param c the class, required. * * @return ASDisplayNodeMethodOverrides. */ @@ -1528,7 +1528,7 @@ static NSInteger incrementIfFound(NSInteger i) { ASDisplayNodeAssertMainThread(); ASDisplayNodeAssert(!_flags.isEnteringHierarchy, @"Should not cause recursive __enterHierarchy"); - // Profiling has shown that locking this method is benificial, so each of the property accesses don't have to lock and unlock. + // Profiling has shown that locking this method is beneficial, so each of the property accesses don't have to lock and unlock. ASDN::MutexLocker l(_propertyLock); if (!self.inHierarchy && !_flags.visibilityNotificationsDisabled && ![self __selfOrParentHasVisibilityNotificationsDisabled]) { @@ -1554,7 +1554,7 @@ static NSInteger incrementIfFound(NSInteger i) { ASDisplayNodeAssertMainThread(); ASDisplayNodeAssert(!_flags.isExitingHierarchy, @"Should not cause recursive __exitHierarchy"); - // Profiling has shown that locking this method is benificial, so each of the property accesses don't have to lock and unlock. + // Profiling has shown that locking this method is beneficial, so each of the property accesses don't have to lock and unlock. ASDN::MutexLocker l(_propertyLock); if (self.inHierarchy && !_flags.visibilityNotificationsDisabled && ![self __selfOrParentHasVisibilityNotificationsDisabled]) { diff --git a/AsyncDisplayKit/ASDisplayNodeExtras.h b/AsyncDisplayKit/ASDisplayNodeExtras.h index 319b5ff62d..b06f806fc9 100644 --- a/AsyncDisplayKit/ASDisplayNodeExtras.h +++ b/AsyncDisplayKit/ASDisplayNodeExtras.h @@ -75,10 +75,10 @@ extern ASDisplayNode * _Nullable ASViewToDisplayNode(UIView * _Nullable view); extern ASDisplayNode *ASDisplayNodeUltimateParentOfNode(ASDisplayNode *node); /** - This function will walk the layer heirarchy, spanning discontinuous sections of the node heirarchy (e.g. the layers + This function will walk the layer hierarchy, spanning discontinuous sections of the node hierarchy (e.g. the layers of UIKit intermediate views in UIViewControllers, UITableView, UICollectionView). In the event that a node's backing layer is not created yet, the function will only walk the direct subnodes instead - of forcing the layer heirarchy to be created. + of forcing the layer hierarchy to be created. */ extern void ASDisplayNodePerformBlockOnEveryNode(CALayer * _Nullable layer, ASDisplayNode * _Nullable node, void(^block)(ASDisplayNode *node)); @@ -109,7 +109,7 @@ extern id _Nullable ASDisplayNodeFindClass(ASDisplayNode *start, Class c); extern ASDisplayNode * _Nullable ASDisplayNodeFindClosestCommonAncestor(ASDisplayNode *node1, ASDisplayNode *node2); /** - Given a display node, collects all descendents. This is a specialization of ASCollectContainer() that walks the Core Animation layer tree as opposed to the display node tree, thus supporting non-continues display node hierarchies. + Given a display node, collects all descendants. This is a specialization of ASCollectContainer() that walks the Core Animation layer tree as opposed to the display node tree, thus supporting non-continues display node hierarchies. */ extern NSArray *ASCollectDisplayNodes(ASDisplayNode *node); diff --git a/AsyncDisplayKit/ASDisplayNodeExtras.mm b/AsyncDisplayKit/ASDisplayNodeExtras.mm index 67e9185d4e..f02e6f9ccb 100644 --- a/AsyncDisplayKit/ASDisplayNodeExtras.mm +++ b/AsyncDisplayKit/ASDisplayNodeExtras.mm @@ -155,9 +155,9 @@ extern __kindof ASDisplayNode * ASDisplayNodeFindFirstSubnodeOfClass(ASDisplayNo }); } -static inline BOOL _ASDisplayNodeIsAncestorOfDisplayNode(ASDisplayNode *possibleAncestor, ASDisplayNode *possibleDescendent) +static inline BOOL _ASDisplayNodeIsAncestorOfDisplayNode(ASDisplayNode *possibleAncestor, ASDisplayNode *possibleDescendant) { - ASDisplayNode *supernode = possibleDescendent; + ASDisplayNode *supernode = possibleDescendant; while (supernode) { if (supernode == possibleAncestor) { return YES; diff --git a/AsyncDisplayKit/ASEditableTextNode.h b/AsyncDisplayKit/ASEditableTextNode.h index 832611c094..5a7ea07940 100644 --- a/AsyncDisplayKit/ASEditableTextNode.h +++ b/AsyncDisplayKit/ASEditableTextNode.h @@ -129,7 +129,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract Indicates to the delegate that the text node's selection has changed. @param editableTextNode An editable text node. @param fromSelectedRange The previously selected range. - @param toSelectedRange The current selected range. Equvialent to the property. + @param toSelectedRange The current selected range. Equivalent to the property. @param dueToEditing YES if the selection change was due to editing; NO otherwise. @discussion You can access the selection of the receiver via . */ diff --git a/AsyncDisplayKit/ASMultiplexImageNode.h b/AsyncDisplayKit/ASMultiplexImageNode.h index 5c02ed6048..73a74cbdeb 100644 --- a/AsyncDisplayKit/ASMultiplexImageNode.h +++ b/AsyncDisplayKit/ASMultiplexImageNode.h @@ -55,7 +55,7 @@ typedef NS_ENUM(NSUInteger, ASMultiplexImageNodeErrorCode) { * @abstract ASMultiplexImageNode is an image node that can load and display multiple versions of an image. For * example, it can display a low-resolution version of an image while the high-resolution version is loading. * - * @discussion ASMultiplexImageNode begins loading images when its *imageIdentifiers; /** - * @abstract Notify the receiver SSAAthat its data source has new UIImages or NSURLs available for . + * @abstract Notify the receiver SSAA that its data source has new UIImages or NSURLs available for . * * @discussion If a higher-quality image than is currently displayed is now available, it will be loaded. */ diff --git a/AsyncDisplayKit/ASNetworkImageNode.h b/AsyncDisplayKit/ASNetworkImageNode.h index 79070aaccc..bb867f576c 100644 --- a/AsyncDisplayKit/ASNetworkImageNode.h +++ b/AsyncDisplayKit/ASNetworkImageNode.h @@ -69,7 +69,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)setURL:(nullable NSURL *)URL resetToDefault:(BOOL)reset; /** - * If is a local file, set this property to YES to take advantage of UIKit's image cacheing. Defaults to YES. + * If is a local file, set this property to YES to take advantage of UIKit's image caching. Defaults to YES. */ @property (nonatomic, assign, readwrite) BOOL shouldCacheImage; @@ -79,7 +79,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - /** * The methods declared by the ASNetworkImageNodeDelegate protocol allow the adopting delegate to respond to - * notifications such as fininished decoding and downloading an image. + * notifications such as finished decoding and downloading an image. */ @protocol ASNetworkImageNodeDelegate diff --git a/AsyncDisplayKit/ASTableView.h b/AsyncDisplayKit/ASTableView.h index 28b825403a..fe1ac2a193 100644 --- a/AsyncDisplayKit/ASTableView.h +++ b/AsyncDisplayKit/ASTableView.h @@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Tuning parameters for a range type in the specified mode. * - * @param rangeMode The range mode to get the runing parameters for. + * @param rangeMode The range mode to get the running parameters for. * @param rangeType The range type to get the tuning parameters for. * * @returns A tuning parameter value for the given range type in the given mode. @@ -92,10 +92,10 @@ NS_ASSUME_NONNULL_BEGIN - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType; /** - * Set the tuning parameters for a range type in the specigied mode. + * Set the tuning parameters for a range type in the specified mode. * * @param tuningParameters The tuning parameters to store for a range type. - * @param rangeMode The range mode to set the runing parameters for. + * @param rangeMode The range mode to set the running parameters for. * @param rangeType The range type to set the tuning parameters for. * * @see ASLayoutRangeMode @@ -143,7 +143,7 @@ NS_ASSUME_NONNULL_BEGIN * Concludes a series of method calls that insert, delete, select, or reload rows and sections of the table view, with animation enabled and no completion block. * You call this method to bracket a series of method calls that begins with beginUpdates and that consists of operations * to insert, delete, select, and reload rows and sections of the table view. When you call endUpdates, ASTableView begins animating - * the operations simultaneously. This method is must be called from the main thread. It's important to remeber that the ASTableView will + * the operations simultaneously. This method is must be called from the main thread. It's important to remember that the ASTableView will * be processing the updates asynchronously after this call is completed. */ - (void)endUpdates; @@ -152,7 +152,7 @@ NS_ASSUME_NONNULL_BEGIN * Concludes a series of method calls that insert, delete, select, or reload rows and sections of the table view. * You call this method to bracket a series of method calls that begins with beginUpdates and that consists of operations * to insert, delete, select, and reload rows and sections of the table view. When you call endUpdates, ASTableView begins animating - * the operations simultaneously. This method is must be called from the main thread. It's important to remeber that the ASTableView will + * the operations simultaneously. This method is must be called from the main thread. It's important to remember that the ASTableView will * be processing the updates asynchronously after this call and are not guaranteed to be reflected in the ASTableView until * the completion block is executed. * @@ -351,7 +351,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Indicator to lock the data source for data fetching in async mode. - * We should not update the data source until the data source has been unlocked. Otherwise, it will incur data inconsistence or exception + * We should not update the data source until the data source has been unlocked. Otherwise, it will incur data inconsistency or exception * due to the data access in async mode. * * @param tableView The sender. @@ -360,7 +360,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Indicator to unlock the data source for data fetching in asyn mode. - * We should not update the data source until the data source has been unlocked. Otherwise, it will incur data inconsistence or exception + * We should not update the data source until the data source has been unlocked. Otherwise, it will incur data inconsistency or exception * due to the data access in async mode. * * @param tableView The sender. diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 695b1e8d7e..6e12c0b2d8 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -493,7 +493,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; } - (void)adjustContentOffsetWithNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths inserting:(BOOL)inserting { - // Maintain the users visible window when inserting or deleteing cells by adjusting the content offset for nodes + // Maintain the users visible window when inserting or deleting cells by adjusting the content offset for nodes // before the visible area. If in a begin/end updates block this will update _contentOffsetAdjustment, otherwise it will // update self.contentOffset directly. diff --git a/AsyncDisplayKit/Details/ASBatchContext.h b/AsyncDisplayKit/Details/ASBatchContext.h index 452582f9cf..dc1986a792 100644 --- a/AsyncDisplayKit/Details/ASBatchContext.h +++ b/AsyncDisplayKit/Details/ASBatchContext.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN @interface ASBatchContext : NSObject /** - * Retreive the state of the current batch process. + * Retrieve the state of the current batch process. * * @returns A boolean reflecting if the owner of the context object is fetching another batch. */ @@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN - (BOOL)batchFetchingWasCancelled; /** - * Notify the context object that something has interupted the batch fetching process. + * Notify the context object that something has interrupted the batch fetching process. * * @discussion Call this method only when something has corrupted the batch fetching process. Calling this method should * be left to the owner of the batch process unless there is a specific purpose. diff --git a/AsyncDisplayKit/Details/ASDataController.h b/AsyncDisplayKit/Details/ASDataController.h index 5042c45de4..587adf2ad7 100644 --- a/AsyncDisplayKit/Details/ASDataController.h +++ b/AsyncDisplayKit/Details/ASDataController.h @@ -131,7 +131,7 @@ FOUNDATION_EXPORT NSString * const ASDataControllerRowNodeKind; * @discussion If enabled, we will fetch data through `dataController:nodeAtIndexPath:` and `dataController:rowsInSection:` in background thread. * Otherwise, the methods will be invoked synchronically in calling thread. Enabling data fetching in async mode could avoid blocking main thread * while allocating cell on main thread, which is frequently reported issue for handling large scale data. On another hand, the application code - * will take the responsibility to avoid data inconsistence. Specifically, we will lock the data source through `dataControllerLockDataSource`, + * will take the responsibility to avoid data inconsistency. Specifically, we will lock the data source through `dataControllerLockDataSource`, * and unlock it by `dataControllerUnlockDataSource` after the data fetching. The application should not update the data source while * the data source is locked. */ diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index c485144d46..7eba4435b9 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -34,7 +34,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; @interface ASDataController () { NSMutableArray *_externalCompletedNodes; // Main thread only. External data access can immediately query this if available. NSMutableDictionary *_completedNodes; // Main thread only. External data access can immediately query this if _externalCompletedNodes is unavailable. - NSMutableDictionary *_editingNodes; // Modified on _editingTransactionQueue only. Updates propogated to _completedNodes. + NSMutableDictionary *_editingNodes; // Modified on _editingTransactionQueue only. Updates propagated to _completedNodes. ASMainSerialQueue *_mainSerialQueue; @@ -355,7 +355,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; } /** - * Inserts sections, represented as arrays, into the backing store at the given indicies and notifies the delegate. + * Inserts sections, represented as arrays, into the backing store at the given indices and notifies the delegate. * * @discussion The section arrays are inserted into the editing store, then a deep copy of the sections are inserted * in the completed store on the main thread. The delegate is invoked on the main thread. @@ -369,7 +369,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; } /** - * Removes sections at the given indicies from the backing store and notifies the delegate. + * Removes sections at the given indices from the backing store and notifies the delegate. * * @discussion Section array are first removed from the editing store, then the associated section in the completed * store is removed on the main thread. The delegate is invoked on the main thread. diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index d89d117af4..446395c1ef 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -59,7 +59,7 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; } } -#pragma mark - Core visible node range managment API +#pragma mark - Core visible node range management API + (ASLayoutRangeMode)rangeModeForInterfaceState:(ASInterfaceState)interfaceState currentRangeMode:(ASLayoutRangeMode)currentRangeMode diff --git a/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h b/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h index 1a36e57662..cc2404fcf3 100644 --- a/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h +++ b/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h @@ -52,7 +52,7 @@ @interface ASViewController (ASRangeControllerUpdateRangeProtocol) -/// Automatically adjust range mode based on view evenets if the containing node confirms to the ASRangeControllerUpdateRangeProtocol +/// Automatically adjust range mode based on view events if the containing node confirms to the ASRangeControllerUpdateRangeProtocol @property (nonatomic, assign) BOOL automaticallyAdjustRangeModeBasedOnViewEvents; @end diff --git a/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.h b/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.h index f169d4e50f..aa28f11f10 100644 --- a/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.h +++ b/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.h @@ -167,7 +167,7 @@ extern NSInteger const ASDefaultTransactionPriority; /** @summary Cancels all operations in the transaction. - @desc You can only cancel a commmitted transaction. + @desc You can only cancel a committed transaction. All completion blocks are always called, regardless of cancelation. Execution blocks may be skipped if canceled. */ diff --git a/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.mm b/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.mm index 66a4fb0df9..a6b395ad18 100644 --- a/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.mm +++ b/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.mm @@ -236,7 +236,7 @@ void ASAsyncTransactionQueue::GroupImpl::schedule(NSInteger priority, dispatch_q operation._block(); } operation._group->leave(); - operation._block = 0; // the block must be freed while mutex is unlocked + operation._block = nil; // the block must be freed while mutex is unlocked } } --entry._threadCount; @@ -484,7 +484,7 @@ ASAsyncTransactionQueue & ASAsyncTransactionQueue::instance() ASDisplayNodeAssert(_state != ASAsyncTransactionStateOpen, @"Transaction should not be open after committing group"); } // If we needed to commit the group above, -completeTransaction may have already been run. - // It is designed to accomodate this by checking _state to ensure it is not complete. + // It is designed to accommodate this by checking _state to ensure it is not complete. [self completeTransaction]; } } diff --git a/AsyncDisplayKit/Details/Transactions/_ASAsyncTransactionGroup.h b/AsyncDisplayKit/Details/Transactions/_ASAsyncTransactionGroup.h index c7b3da3217..198cf3a7f6 100644 --- a/AsyncDisplayKit/Details/Transactions/_ASAsyncTransactionGroup.h +++ b/AsyncDisplayKit/Details/Transactions/_ASAsyncTransactionGroup.h @@ -18,7 +18,7 @@ + (void)commit; /// Add a transaction container to be committed. -/// @param containerLayer A layer containing a transaction to be commited. May or may not be a container layer. +/// @param containerLayer A layer containing a transaction to be committed. May or may not be a container layer. /// @see ASAsyncTransactionContainer - (void)addTransactionContainer:(CALayer *)containerLayer; @end diff --git a/AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm b/AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm index 5e81e1f3d2..487a7e3b86 100644 --- a/AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm @@ -79,7 +79,7 @@ MIN(size.height, (_sizingOptions & ASCenterLayoutSpecSizingOptionMinimumY) != 0 ? sublayout.size.height : size.height) }); - // Compute the centered postion for the child + // Compute the centered position for the child BOOL shouldCenterAlongX = (_centeringOptions & ASCenterLayoutSpecCenteringX); BOOL shouldCenterAlongY = (_centeringOptions & ASCenterLayoutSpecCenteringY); sublayout.position = { diff --git a/AsyncDisplayKit/Layout/ASLayout.h b/AsyncDisplayKit/Layout/ASLayout.h index 073e2a6a11..41b4878461 100644 --- a/AsyncDisplayKit/Layout/ASLayout.h +++ b/AsyncDisplayKit/Layout/ASLayout.h @@ -60,7 +60,7 @@ extern BOOL CGPointIsNull(CGPoint point); * * @param size The size of this layout. * - * @param position The posiion of this layout within its parent (if available). + * @param position The position of this layout within its parent (if available). * * @param sublayouts Sublayouts belong to the new layout. */ diff --git a/AsyncDisplayKit/Layout/ASLayoutOptions.h b/AsyncDisplayKit/Layout/ASLayoutOptions.h index 7ce0f404e2..fbc50bf8e3 100644 --- a/AsyncDisplayKit/Layout/ASLayoutOptions.h +++ b/AsyncDisplayKit/Layout/ASLayoutOptions.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN * A store for all of the options defined by ASLayoutSpec subclasses. All implementors of ASLayoutable own a * ASLayoutOptions. When certain layoutSpecs need option values, they are read from this class. * - * Unless you wish to create a custom layout spec, ASLayoutOptions can largerly be ignored. Instead you can access + * Unless you wish to create a custom layout spec, ASLayoutOptions can largely be ignored. Instead you can access * the layout option properties exposed in ASLayoutable directly, which will set the values in ASLayoutOptions * behind the scenes. */ diff --git a/AsyncDisplayKit/Layout/ASLayoutOptionsPrivate.mm b/AsyncDisplayKit/Layout/ASLayoutOptionsPrivate.mm index 64b3f7b629..334f42f1a5 100644 --- a/AsyncDisplayKit/Layout/ASLayoutOptionsPrivate.mm +++ b/AsyncDisplayKit/Layout/ASLayoutOptionsPrivate.mm @@ -10,7 +10,6 @@ #import "ASLayoutOptionsPrivate.h" #import -#import "ASThread.h" /** @@ -21,7 +20,7 @@ * create a define that allows us to easily implement the forwards in one place. * * If you create a custom layout spec, we recommend this stragety if you decide to extend - * ASDisplayNode and ASLAyoutSpec to provide convenience properties for any options that your + * ASDisplayNode and ASLayoutSpec to provide convenience properties for any options that your * layoutSpec may require. */ #define ASLayoutOptionsForwarding \ diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.h b/AsyncDisplayKit/Layout/ASLayoutSpec.h index da6de78e0f..991c4224a7 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.h +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.h @@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN * @param child A child to be added. * * @discussion Every ASLayoutSpec must act on at least one child. The ASLayoutSpec base class takes the - * reponsibility of holding on to the spec children. Some layout specs, like ASInsetLayoutSpec, + * responsibility of holding on to the spec children. Some layout specs, like ASInsetLayoutSpec, * only require a single child. * * For layout specs that require a known number of children (ASBackgroundLayoutSpec, for example) @@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN * @param identifier An identifier associated with the child. * * @discussion Every ASLayoutSpec must act on at least one child. The ASLayoutSpec base class takes the - * reponsibility of holding on to the spec children. Some layout specs, like ASInsetLayoutSpec, + * responsibility of holding on to the spec children. Some layout specs, like ASInsetLayoutSpec, * only require a single child. * * For layout specs that require a known number of children (ASBackgroundLayoutSpec, for example) diff --git a/AsyncDisplayKit/Layout/ASLayoutable.h b/AsyncDisplayKit/Layout/ASLayoutable.h index 4653e38def..121477b1f6 100644 --- a/AsyncDisplayKit/Layout/ASLayoutable.h +++ b/AsyncDisplayKit/Layout/ASLayoutable.h @@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN * These layout options are all stored in an ASLayoutOptions class (that is defined in ASLayoutablePrivate). * Generally you needn't worry about the layout options class, as the layoutable protocols allow all direct * access to the options via convenience properties. If you are creating custom layout spec, then you can - * extend the backing layout options class to accomodate any new layout options. + * extend the backing layout options class to accommodate any new layout options. */ @protocol ASLayoutable diff --git a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm index 98e8a2bc68..29ebe1265b 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm +++ b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm @@ -64,7 +64,7 @@ static void __ASDisplayLayerIncrementConcurrentDisplayCount(BOOL displayIsAsync, */ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, BOOL isRasterizing) { - // Displays while rasterizing are not counted as concurrent displays, becuase they draw in serial when their rasterizing container displays. + // Displays while rasterizing are not counted as concurrent displays, because they draw in serial when their rasterizing container displays. if (isRasterizing) { return; } @@ -92,7 +92,7 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, BOOL rasterizingFromAscendent = (_hierarchyState & ASHierarchyStateRasterized); - // if super node is rasterizing descendents, subnodes will not have had layout calls because they don't have layers + // if super node is rasterizing descendants, subnodes will not have had layout calls because they don't have layers if (rasterizingFromAscendent) { [self __layout]; } diff --git a/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h b/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h index 79f2b2e273..57d68c5dd0 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h +++ b/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN /** - Hierarchy state is propogated from nodes to all of their children when certain behaviors are required from the subtree. + Hierarchy state is propagated from nodes to all of their children when certain behaviors are required from the subtree. Examples include rasterization and external driving of the .interfaceState property. By passing this information explicitly, performance is optimized by avoiding iteration up the supernode chain. Lastly, this avoidance of supernode traversal protects against the possibility of deadlocks when a supernode is @@ -41,9 +41,9 @@ typedef NS_OPTIONS(NSUInteger, ASHierarchyState) ASHierarchyStateRasterized = 1 << 0, /** The node or one of its supernodes is managed by a class like ASRangeController. Most commonly, these nodes are ASCellNode objects or a subnode of one, and are used in ASTableView or ASCollectionView. - These nodes also recieve regular updates to the .interfaceState property with more detailed status information. */ + These nodes also receive regular updates to the .interfaceState property with more detailed status information. */ ASHierarchyStateRangeManaged = 1 << 1, - /** Down-propogated version of _flags.visibilityNotificationsDisabled. This flag is very rarely set, but by having it + /** Down-propagated version of _flags.visibilityNotificationsDisabled. This flag is very rarely set, but by having it locally available to nodes, they do not have to walk up supernodes at the critical points it is checked. */ ASHierarchyStateTransitioningSupernodes = 1 << 2, /** One of the supernodes of this node is performing a transition. @@ -93,9 +93,9 @@ inline BOOL ASHierarchyStateIncludesLayoutPending(ASHierarchyState hierarchyStat // The two methods below will eventually be exposed, but their names are subject to change. /** - * @abstract Ensure that all rendering is complete for this node and its descendents. + * @abstract Ensure that all rendering is complete for this node and its descendants. * - * @discussion Calling this method on the main thread after a node is added to the view heirarchy will ensure that + * @discussion Calling this method on the main thread after a node is added to the view hierarchy will ensure that * placeholder states are never visible to the user. It is used by ASTableView, ASCollectionView, and ASViewController * to implement their respective ".neverShowPlaceholders" option. * diff --git a/AsyncDisplayKit/Private/ASDisplayNode+UIViewBridge.mm b/AsyncDisplayKit/Private/ASDisplayNode+UIViewBridge.mm index 68876415a7..bf0b9f200d 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+UIViewBridge.mm +++ b/AsyncDisplayKit/Private/ASDisplayNode+UIViewBridge.mm @@ -302,7 +302,7 @@ if (shouldApply) { _layer.layerProperty = (layerValueExpr); } else { ASDisplayNo if (_hierarchyState & ASHierarchyStateRasterized) { ASPerformBlockOnMainThread(^{ // The below operation must be performed on the main thread to ensure against an extremely rare deadlock, where a parent node - // begins materializing the view / layer heirarchy (locking itself or a descendant) while this node walks up + // begins materializing the view / layer hierarchy (locking itself or a descendant) while this node walks up // the tree and requires locking that node to access .shouldRasterizeDescendants. // For this reason, this method should be avoided when possible. Use _hierarchyState & ASHierarchyStateRasterized. ASDisplayNodeAssertMainThread(); diff --git a/AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.mm b/AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.mm index 28f19ffd77..ed6b622162 100644 --- a/AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.mm +++ b/AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.mm @@ -87,7 +87,7 @@ ASStackBaselinePositionedLayout ASStackBaselinePositionedLayout::compute(const A for each node is our computed maxAscender - node.ascender. If the 16pt node had an ascender of 10 and the 14pt node had an ascender of 8, that means we will offset the 14pt node by 2 pts. - Note: if we are alinging to the last baseline, then we don't need this value in our computation. However, we do want + Note: if we are aligning to the last baseline, then we don't need this value in our computation. However, we do want our layoutSpec to have it so that it can be baseline aligned with another text node or baseline layout spec. */ const auto ascenderIt = std::max_element(positionedLayout.sublayouts.begin(), positionedLayout.sublayouts.end(), [&](const ASLayout *a, const ASLayout *b){ @@ -144,7 +144,7 @@ ASStackBaselinePositionedLayout ASStackBaselinePositionedLayout::compute(const A font size of 40 (max ascender). Now, we have to move the node with multiple lines down to the other node's baseline. This node with multiple lines will extend below the first node farther than it did before aligning the baselines thus increasing the cross size. - After finding the new cross size, we need to clamp it so that it fits within the constrainted size. + After finding the new cross size, we need to clamp it so that it fits within the constrained size. */ const auto it = std::max_element(stackedChildren.begin(), stackedChildren.end(), diff --git a/AsyncDisplayKit/Private/ASWeakSet.m b/AsyncDisplayKit/Private/ASWeakSet.m index 7d8b180080..95c4ad1275 100644 --- a/AsyncDisplayKit/Private/ASWeakSet.m +++ b/AsyncDisplayKit/Private/ASWeakSet.m @@ -46,7 +46,7 @@ // mutable collection is still not safe while enumerating that way - which is one of the main uses for this method. // A helper function called NSAllMapTableKeys() might do exactly what we want and should be more efficient, but unfortunately // is throwing a strange compiler error and may not be available in practice on the latest iOS version. - // Lastly, even -dictionaryRepresentation and then -allKeys won't work, because it attemps to copy the values of each key, + // Lastly, even -dictionaryRepresentation and then -allKeys won't work, because it attempts to copy the values of each key, // which may not support copying (such as ASRangeControllers). NSMutableArray *allObjects = [NSMutableArray array]; for (id object in _mapTable) { diff --git a/AsyncDisplayKit/TextKit/ASTextKitCoreTextAdditions.h b/AsyncDisplayKit/TextKit/ASTextKitCoreTextAdditions.h index 9b8ad1ae56..6fe202fa36 100644 --- a/AsyncDisplayKit/TextKit/ASTextKitCoreTextAdditions.h +++ b/AsyncDisplayKit/TextKit/ASTextKitCoreTextAdditions.h @@ -76,7 +76,7 @@ ASDISPLAYNODE_EXTERN_C_END - kCTParagraphStyleSpecifierMinimumLineSpacing - kCTParagraphStyleSpecifierLineSpacingAdjustment - kCTParagraphStyleSpecifierLineBoundsOptions - @result An NSParagraphStyle initializd with as many of the paragraph specifiers from `coreTextParagraphStyle` as possible. + @result An NSParagraphStyle initialized with as many of the paragraph specifiers from `coreTextParagraphStyle` as possible. */ + (instancetype)paragraphStyleWithCTParagraphStyle:(CTParagraphStyleRef)coreTextParagraphStyle; diff --git a/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm b/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm index 1ea45e2b91..d48013a772 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm @@ -62,7 +62,7 @@ // We assume LTR so long as the writing direction is not BOOL rtlWritingDirection = paragraphStyle ? paragraphStyle.baseWritingDirection == NSWritingDirectionRightToLeft : NO; - // We only want to treat the trunction rect as left-aligned in the case that we are right-aligned and our writing + // We only want to treat the truncation rect as left-aligned in the case that we are right-aligned and our writing // direction is RTL. BOOL leftAligned = CGRectGetMinX(lastLineRect) == CGRectGetMinX(lastLineUsedRect) || !rtlWritingDirection;