Skip to content

Commit 316cb39

Browse files
committed
Fix spelling errors in internal and external comments
1 parent 5c3b93f commit 316cb39

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

MBProgressHUD.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ NS_ASSUME_NONNULL_BEGIN
105105
/**
106106
* Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:.
107107
*
108-
* @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden.
108+
* @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden.
109109
*
110110
* @param view The view that is going to be searched for a HUD subview.
111111
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
@@ -127,7 +127,7 @@ NS_ASSUME_NONNULL_BEGIN
127127

128128
/**
129129
* A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with
130-
* view.bounds as the parameter
130+
* view.bounds as the parameter.
131131
*
132132
* @param view The view instance that will provide the bounds for the HUD. Should be the same instance as
133133
* the HUD's superview (i.e., the view that the HUD will be added to).
@@ -137,9 +137,9 @@ NS_ASSUME_NONNULL_BEGIN
137137
/**
138138
* Displays the HUD.
139139
*
140-
* @note You need to make sure that the main thread completes its run loop soon after this method call so
141-
* the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread
142-
* (e.g., when using something like NSOperation or calling an asynchronous call like NSURLRequest).
140+
* @note You need to make sure that the main thread completes its run loop soon after this method call so that
141+
* the user interface can be updated. Call this method when your task is already set up to be executed in a new thread
142+
* (e.g., when using something like NSOperation or making an asynchronous call like NSURLRequest).
143143
*
144144
* @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use
145145
* animations while appearing.
@@ -262,13 +262,13 @@ NS_ASSUME_NONNULL_BEGIN
262262
@property (strong, nonatomic, readonly) MBBackgroundView *bezelView;
263263

264264
/**
265-
* View coving the entire HUD area, placed behind bezelView.
265+
* View covering the entire HUD area, placed behind bezelView.
266266
*/
267267
@property (strong, nonatomic, readonly) MBBackgroundView *backgroundView;
268268

269269
/**
270270
* The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView.
271-
* The view should implement intrinsicContentSize for proper sizing. For best results use approximately 37 by 37 pixel.
271+
* The view should implement intrinsicContentSize for proper sizing. For best results use approximately 37 by 37 pixels.
272272
*/
273273
@property (strong, nonatomic, nullable) UIView *customView;
274274

@@ -315,19 +315,19 @@ NS_ASSUME_NONNULL_BEGIN
315315

316316
/**
317317
* Indicator progress color.
318-
* Defaults to white [UIColor whiteColor]
318+
* Defaults to white [UIColor whiteColor].
319319
*/
320320
@property (nonatomic, strong) UIColor *progressTintColor;
321321

322322
/**
323323
* Indicator background (non-progress) color.
324-
* Only applicable on iOS version older than iOS 7.
325-
* Defaults to translucent white (alpha 0.1)
324+
* Only applicable on iOS versions older than iOS 7.
325+
* Defaults to translucent white (alpha 0.1).
326326
*/
327327
@property (nonatomic, strong) UIColor *backgroundTintColor;
328328

329329
/*
330-
* Display mode - NO = round or YES = annular. De+faults to round.
330+
* Display mode - NO = round or YES = annular. Defaults to round.
331331
*/
332332
@property (nonatomic, assign, getter = isAnnular) BOOL annular;
333333

@@ -370,13 +370,13 @@ NS_ASSUME_NONNULL_BEGIN
370370
/**
371371
* The background style.
372372
* Defaults to MBProgressHUDBackgroundStyleBlur on iOS 7 or later and MBProgressHUDBackgroundStyleSolidColor otherwise.
373-
* @note Due to iOS 7 not supporting UIVisualEffectView the blur effect differs slightly between iOS 7 and later versions.
373+
* @note Due to iOS 7 not supporting UIVisualEffectView, the blur effect differs slightly between iOS 7 and later versions.
374374
*/
375375
@property (nonatomic) MBProgressHUDBackgroundStyle style;
376376

377377
/**
378378
* The background color or the blur tint color.
379-
* @note Due to iOS 7 not supporting UIVisualEffectView the blur effect differs slightly between iOS 7 and later versions.
379+
* @note Due to iOS 7 not supporting UIVisualEffectView, the blur effect differs slightly between iOS 7 and later versions.
380380
*/
381381
@property (nonatomic, strong) UIColor *color;
382382

MBProgressHUD.m

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
@interface MBProgressHUD () {
29-
// Depricated
29+
// Deprecated
3030
UIColor *_activityIndicatorColor;
3131
CGFloat _opacity;
3232
}
@@ -142,7 +142,7 @@ - (void)showAnimated:(BOOL)animated {
142142
[self.minShowTimer invalidate];
143143
self.useAnimation = animated;
144144
self.finished = NO;
145-
// If the grace time is set postpone the HUD display
145+
// If the grace time is set, postpone the HUD display
146146
if (self.graceTime > 0.0) {
147147
NSTimer *timer = [NSTimer timerWithTimeInterval:self.graceTime target:self selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO];
148148
[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
@@ -159,8 +159,8 @@ - (void)hideAnimated:(BOOL)animated {
159159
[self.graceTimer invalidate];
160160
self.useAnimation = animated;
161161
self.finished = YES;
162-
// If the minShow time is set, calculate how long the hud was shown,
163-
// and pospone the hiding operation if necessary
162+
// If the minShow time is set, calculate how long the HUD was shown,
163+
// and postpone the hiding operation if necessary
164164
if (self.minShowTime > 0.0 && self.showStarted) {
165165
NSTimeInterval interv = [[NSDate date] timeIntervalSinceDate:self.showStarted];
166166
if (interv < self.minShowTime) {
@@ -242,7 +242,7 @@ - (void)hideUsingAnimation:(BOOL)animated {
242242
}
243243

244244
- (void)animateIn:(BOOL)animatingIn withType:(MBProgressHUDAnimation)type completion:(void(^)(BOOL finished))completion {
245-
// Automatically determine the correct
245+
// Automatically determine the correct zoom animation type
246246
if (type == MBProgressHUDAnimationZoom) {
247247
type = animatingIn ? MBProgressHUDAnimationZoomIn : MBProgressHUDAnimationZoomOut;
248248
}
@@ -501,7 +501,7 @@ - (void)updateConstraints {
501501
NSMutableArray *subviews = [NSMutableArray arrayWithObjects:self.topSpacer, self.label, self.detailsLabel, self.button, self.bottomSpacer, nil];
502502
if (self.indicator) [subviews insertObject:self.indicator atIndex:1];
503503

504-
// Remove existing constraintes
504+
// Remove existing constraints
505505
[self removeConstraints:self.constraints];
506506
[topSpacer removeConstraints:topSpacer.constraints];
507507
[bottomSpacer removeConstraints:bottomSpacer.constraints];
@@ -560,7 +560,7 @@ - (void)updateConstraints {
560560
// First, ensure spacing to bezel edge
561561
[bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeTop multiplier:1.f constant:0.f]];
562562
} else if (idx == subviews.count - 1) {
563-
// Last, ensure spacigin to bezel edge
563+
// Last, ensure spacing to bezel edge
564564
[bezelConstraints addObject:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:bezel attribute:NSLayoutAttributeBottom multiplier:1.f constant:0.f]];
565565
}
566566
if (idx > 0) {
@@ -593,8 +593,8 @@ - (void)updatePaddingConstraints {
593593
UIView *secondView = (UIView *)padding.secondItem;
594594
BOOL firstVisible = !firstView.hidden && !CGSizeEqualToSize(firstView.intrinsicContentSize, CGSizeZero);
595595
BOOL secondVisible = !secondView.hidden && !CGSizeEqualToSize(secondView.intrinsicContentSize, CGSizeZero);
596-
// Set if both views are visible of if there's a visible view on top that yet doesn't have padding
597-
// added relative to the current view
596+
// Set if both views are visible or if there's a visible view on top that doesn't have padding
597+
// added relative to the current view yet
598598
padding.constant = (firstVisible && (secondVisible || hasVisibleAncestors)) ? MBDefaultPadding : 0.f;
599599
hasVisibleAncestors |= secondVisible;
600600
}];
@@ -1362,16 +1362,16 @@ - (instancetype)initWithFrame:(CGRect)frame {
13621362

13631363
- (void)layoutSubviews {
13641364
[super layoutSubviews];
1365-
// Fully rounded corners.
1365+
// Fully rounded corners
13661366
CGFloat height = CGRectGetHeight(self.bounds);
13671367
self.layer.cornerRadius = ceil(height / 2.f);
13681368
}
13691369

13701370
- (CGSize)intrinsicContentSize {
1371-
// Only show, if we have associated control events.
1371+
// Only show if we have associated control events
13721372
if (self.allControlEvents == 0) return CGSizeZero;
13731373
CGSize size = [super intrinsicContentSize];
1374-
// Add some side padding.
1374+
// Add some side padding
13751375
size.width += 20.f;
13761376
return size;
13771377
}
@@ -1380,7 +1380,7 @@ - (CGSize)intrinsicContentSize {
13801380

13811381
- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state {
13821382
[super setTitleColor:color forState:state];
1383-
// Update related colors.
1383+
// Update related colors
13841384
[self setHighlighted:self.highlighted];
13851385
self.layer.borderColor = color.CGColor;
13861386
}

0 commit comments

Comments
 (0)