Skip to content

Commit

Permalink
ran clang-format (#6027)
Browse files Browse the repository at this point in the history
  • Loading branch information
yarneo committed Jan 11, 2019
1 parent a9146ba commit 9873d9f
Show file tree
Hide file tree
Showing 126 changed files with 284 additions and 329 deletions.
14 changes: 6 additions & 8 deletions components/ActionSheet/src/MDCActionSheetController.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
in a sheet from the bottom.
*/
__attribute__((objc_subclassing_restricted))
@interface MDCActionSheetController : UIViewController
__attribute__((objc_subclassing_restricted)) @interface MDCActionSheetController : UIViewController

/**
Designated initializer to create and return a view controller for displaying an alert to the user.
Expand Down Expand Up @@ -95,22 +94,22 @@ __attribute__((objc_subclassing_restricted))
The order of the actions in the array matches the order in which they were added
to the action sheet.
*/
@property (nonatomic, nonnull, readonly, copy) NSArray<MDCActionSheetAction *> *actions;
@property(nonatomic, nonnull, readonly, copy) NSArray<MDCActionSheetAction *> *actions;

/**
The title of the action sheet controller.
If this is updated after presentation the view will be updated to match the
new value.
*/
@property (nonatomic, nullable, copy) NSString *title;
@property(nonatomic, nullable, copy) NSString *title;

/**
The message of the action sheet controller.
If this is updated after presentation the view will be updated to match the new value.
*/
@property (nonatomic, nullable, copy) NSString *message;
@property(nonatomic, nullable, copy) NSString *message;

/**
Indicates whether the button should automatically update its font when the device’s
Expand Down Expand Up @@ -204,7 +203,6 @@ typedef void (^MDCActionSheetHandler)(MDCActionSheetAction *_Nonnull action);
*/
@interface MDCActionSheetAction : NSObject <NSCopying, UIAccessibilityIdentification>


/**
Returns an action sheet action with the populated given values.
Expand All @@ -228,15 +226,15 @@ typedef void (^MDCActionSheetHandler)(MDCActionSheetAction *_Nonnull action);
Action sheet actions must have a title that will be set within actionWithTitle:image:handler:
method.
*/
@property (nonatomic, nonnull, readonly) NSString *title;
@property(nonatomic, nonnull, readonly) NSString *title;

/**
Image of the list item shown on the action sheet.
Action sheet actions must have an image that will be set within actionWithTitle:image:handler:
method.
*/
@property (nonatomic, nullable, readonly) UIImage *image;
@property(nonatomic, nullable, readonly) UIImage *image;

/**
The @c accessibilityIdentifier for the view associated with this action.
Expand Down
8 changes: 4 additions & 4 deletions components/ActionSheet/src/private/MDCActionSheetHeaderView.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
/** Header must be created with initWithFrame */
- (nullable instancetype)initWithCoder:(nonnull NSCoder *)aDecoder NS_UNAVAILABLE;

@property (nonatomic, nullable, copy) NSString *title;
@property(nonatomic, nullable, copy) NSString *title;

@property (nonatomic, nullable, copy) NSString *message;
@property(nonatomic, nullable, copy) NSString *message;

@property(nonatomic, setter=mdc_setAdjustsFontForContentSizeCategory:)
BOOL mdc_adjustsFontForContentSizeCategory;

@property (nonatomic, strong, nonnull) UIFont *titleFont;
@property(nonatomic, strong, nonnull) UIFont *titleFont;

@property (nonatomic, strong, nonnull) UIFont *messageFont;
@property(nonatomic, strong, nonnull) UIFont *messageFont;

@property(nonatomic, strong, nullable) UIColor *titleTextColor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#import <UIKit/UIKit.h>
#import "MaterialInk.h"
#import "MDCActionSheetController.h"
#import "MaterialInk.h"

@interface MDCActionSheetItemTableViewCell : UITableViewCell
/**
Expand Down
10 changes: 5 additions & 5 deletions components/ActivityIndicator/src/MDCActivityIndicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ IB_DESIGNABLE

/**
The array of colors that are cycled through when animating the spinner. Populated with a set of
default colors.
@note If an empty array is provided to this property's setter, then the provided array will be
default colors.
@note If an empty array is provided to this property's setter, then the provided array will be
discarded and an array consisting of the default color values will be assigned instead.
*/
@property(nonatomic, copy, nonnull) NSArray<UIColor *> *cycleColors UI_APPEARANCE_SELECTOR;
Expand Down Expand Up @@ -195,7 +195,7 @@ typedef void (^MDCActivityIndicatorAnimation)(CGFloat strokeStart, CGFloat strok

- (nonnull instancetype)initWithCoder:(nonnull NSCoder *)aDecoder NS_UNAVAILABLE;

- (nonnull instancetype)initWithAnimation:
(_Nonnull MDCActivityIndicatorAnimation)animation NS_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithAnimation:(_Nonnull MDCActivityIndicatorAnimation)animation
NS_DESIGNATED_INITIALIZER;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ typedef struct MDCActivityIndicatorMotionSpecProgress {
MDMMotionTiming strokeEnd;
} MDCActivityIndicatorMotionSpecProgress;

__attribute__((objc_subclassing_restricted))
@interface MDCActivityIndicatorMotionSpec: NSObject
__attribute__((objc_subclassing_restricted)) @interface MDCActivityIndicatorMotionSpec : NSObject

@property(nonatomic, class, readonly) NSTimeInterval pointCycleDuration;
@property(nonatomic, class, readonly) NSTimeInterval pointCycleMinimumVariableDuration;
Expand All @@ -53,4 +52,3 @@ __attribute__((objc_subclassing_restricted))
- (instancetype)init NS_UNAVAILABLE;

@end

Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
// This table is to be indexed using the generated enum.

static NSString *const kMaterialActivityIndicatorStringTable[] = {
@"MaterialActivityIndicatorInProgressAccessibilityValue", // In Progress
@"MaterialActivityIndicatorAccessibilityLabel", // Activity Indicator
@"MaterialActivityIndicatorProgressHaltedAccessibilityValue", // Progress Halted
@"MaterialActivityIndicatorProgressCompletedAccessibilityValue", // %ld Percent Complete
@"MaterialActivityIndicatorInProgressAccessibilityValue", // In Progress
@"MaterialActivityIndicatorAccessibilityLabel", // Activity Indicator
@"MaterialActivityIndicatorProgressHaltedAccessibilityValue", // Progress Halted
@"MaterialActivityIndicatorProgressCompletedAccessibilityValue", // %ld Percent Complete
};
#define kNumMaterialActivityIndicatorStrings 4
#define kMaterialActivityIndicatorStringsOffset 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ typedef NS_ENUM(NSUInteger, MDCAnimationTimingFunction) {
faster than the standard curve since it doesn't follow an exact path to the off-screen point.
*/
MDCAnimationTimingFunctionSharp,

/**
Aliases for depreciated names
*/
Expand Down
4 changes: 2 additions & 2 deletions components/AnimationTiming/src/UIView+MDCTimingFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
duration:(NSTimeInterval)duration
delay:(NSTimeInterval)delay
options:(UIViewAnimationOptions)options
animations:(void (^ __nonnull)(void))animations
completion:(void (^ __nullable)(BOOL finished))completion;
animations:(void (^__nonnull)(void))animations
completion:(void (^__nullable)(BOOL finished))completion;

@end
2 changes: 1 addition & 1 deletion components/AppBar/src/ColorThemer/MDCAppBarColorThemer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@param appBarViewController A component instance to which the color scheme should be applied.
*/
+ (void)applyColorScheme:(nonnull id<MDCColorScheming>)colorScheme
toAppBarViewController:(nonnull MDCAppBarViewController *)appBarViewController;
toAppBarViewController:(nonnull MDCAppBarViewController *)appBarViewController;

/**
Applies a color scheme's properties to an MDCAppBarViewController instance using the surface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
// limitations under the License.

#import "MDCAppBarColorThemer.h"

3 changes: 1 addition & 2 deletions components/AppBar/src/MDCAppBarContainerViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
Initializes an App Bar container view controller instance with the given content view controller.
*/
- (nonnull instancetype)initWithContentViewController:
(nonnull UIViewController *)contentViewController NS_DESIGNATED_INITIALIZER;
(nonnull UIViewController *)contentViewController NS_DESIGNATED_INITIALIZER;

- (nonnull instancetype)initWithNibName:(nullable NSString *)nibNameOrNil
bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
Expand Down Expand Up @@ -97,4 +97,3 @@
@property(nonatomic, strong, nonnull, readonly) MDCAppBar *appBar;

@end

11 changes: 6 additions & 5 deletions components/AppBar/src/MDCAppBarNavigationController.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
@warning This method will soon be deprecated. Please use
-appBarNavigationController:willAddAppBarViewController:asChildOfViewController: instead. Learn
more at https://github.com/material-components/material-components-ios/blob/develop/components/AppBar/docs/migration-guide-appbar-appbarviewcontroller.md
more at
https://github.com/material-components/material-components-ios/blob/develop/components/AppBar/docs/migration-guide-appbar-appbarviewcontroller.md
*/
- (void)appBarNavigationController:(nonnull MDCAppBarNavigationController *)navigationController
willAddAppBar:(nonnull MDCAppBar *)appBar
Expand All @@ -80,8 +81,8 @@
delegate yet. In this case, use the -appBarForViewController: API to retrieve the injected App Bar
for your root view controller and execute your delegate logic on the returned result, if any.
*/
__attribute__((objc_subclassing_restricted))
@interface MDCAppBarNavigationController : UINavigationController
__attribute__((objc_subclassing_restricted)) @interface MDCAppBarNavigationController
: UINavigationController

#pragma mark - Reacting to state changes

Expand All @@ -107,9 +108,9 @@ __attribute__((objc_subclassing_restricted))
Returns the injected App Bar for a given view controller, if an App Bar was injected.
@warning This method will eventually be deprecated. Use -appBarViewControllerForViewController:
instead. Learn more at https://github.com/material-components/material-components-ios/blob/develop/components/AppBar/docs/migration-guide-appbar-appbarviewcontroller.md
instead. Learn more at
https://github.com/material-components/material-components-ios/blob/develop/components/AppBar/docs/migration-guide-appbar-appbarviewcontroller.md
*/
- (nullable MDCAppBar *)appBarForViewController:(nonnull UIViewController *)viewController;

@end

2 changes: 1 addition & 1 deletion components/AppBar/src/MaterialAppBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "MDCAppBarViewController.h"
#import "MDCAppBarContainerViewController.h"
#import "MDCAppBarNavigationController.h"
#import "MDCAppBarViewController.h"

#pragma mark - To be deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// This table is to be indexed using the generated enum.

static NSString *const kMaterialAppBarStringTable[] = {
@"MaterialAppBarBackButtonAccessibilityLabel", // Back
@"MaterialAppBarBackButtonAccessibilityLabel", // Back
};
#define kNumMaterialAppBarStrings 1
#define kMaterialAppBarStringsOffset 0
Expand Down
6 changes: 3 additions & 3 deletions components/BottomAppBar/src/MDCBottomAppBarView.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ typedef NS_ENUM(NSInteger, MDCBottomAppBarFloatingButtonPosition) {

/**
A bottom app bar view with an embedded floating button.
The bottom app bar is a bar docked at the bottom of the screen. A floating action button is
provided for a primary action.
*/
Expand Down Expand Up @@ -106,7 +106,7 @@ typedef NS_ENUM(NSInteger, MDCBottomAppBarFloatingButtonPosition) {

/**
Sets the visibility of the floating action button.
@param animated Enable or disable animation.
*/
- (void)setFloatingButtonHidden:(BOOL)floatingButtonHidden animated:(BOOL)animated;
Expand All @@ -123,7 +123,7 @@ typedef NS_ENUM(NSInteger, MDCBottomAppBarFloatingButtonPosition) {
/**
Sets the position of the floating action button. Note, if the set position is the same as the
current position there is no change in the position nor animation.
@param animated Enable or disable animation.
*/
- (void)setFloatingButtonPosition:(MDCBottomAppBarFloatingButtonPosition)floatingButtonPosition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import "MaterialColorScheme.h"
#import "MaterialBottomNavigation.h"
#import "MaterialColorScheme.h"

/**
The Material Design color system's themer for instances of MDCBottomNavigationBar.
Expand Down
14 changes: 7 additions & 7 deletions components/BottomNavigation/src/MDCBottomNavigationBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ typedef NS_ENUM(NSInteger, MDCBottomNavigationBarAlignment) {
Configures when item titles should be displayed.
Default is MDCBottomNavigationBarTitleVisibilitySelected.
*/
@property(nonatomic, assign) MDCBottomNavigationBarTitleVisibility titleVisibility
UI_APPEARANCE_SELECTOR;
@property(nonatomic, assign)
MDCBottomNavigationBarTitleVisibility titleVisibility UI_APPEARANCE_SELECTOR;

/**
Configures item space distribution and title orientation in landscape mode.
Expand Down Expand Up @@ -98,8 +98,8 @@ typedef NS_ENUM(NSInteger, MDCBottomNavigationBarAlignment) {
Color of selected item. Applies color to items' icons and text. If set also sets
selectedItemTitleColor. Default color is black.
*/
@property (nonatomic, strong, readwrite, nonnull) UIColor *selectedItemTintColor
UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong, readwrite, nonnull)
UIColor *selectedItemTintColor UI_APPEARANCE_SELECTOR;

/**
Color of the selected item's title text. Default color is black.
Expand All @@ -110,8 +110,8 @@ typedef NS_ENUM(NSInteger, MDCBottomNavigationBarAlignment) {
Color of unselected items. Applies color to items' icons. Text is not displayed in unselected mode.
Default color is dark gray.
*/
@property (nonatomic, strong, readwrite, nonnull) UIColor *unselectedItemTintColor
UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong, readwrite, nonnull)
UIColor *unselectedItemTintColor UI_APPEARANCE_SELECTOR;

/**
Color of the background of bottom navigation bar and the bar items.
Expand All @@ -121,7 +121,7 @@ typedef NS_ENUM(NSInteger, MDCBottomNavigationBarAlignment) {
/**
To color the background of the view use -barTintColor instead.
*/
@property(nullable, nonatomic,copy) UIColor *backgroundColor UI_APPEARANCE_SELECTOR;
@property(nullable, nonatomic, copy) UIColor *backgroundColor UI_APPEARANCE_SELECTOR;

/**
The inset applied to each items bounds to determine the rect in which the items' contents will be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#import <UIKit/UIKit.h>
#import <CoreGraphics/CoreGraphics.h>
#import <UIKit/UIKit.h>

@interface MDCBottomNavigationItemBadge : UIView

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
// This table is to be indexed using the generated enum.

static NSString *const kMaterialBottomNavigationStringTable[] = {
@"MaterialBottomNavigationItemCountAccessibilityHint",
@"MaterialBottomNavigationTabElementAccessibilityLabel",
@"MaterialBottomNavigationItemCountAccessibilityHint",
@"MaterialBottomNavigationTabElementAccessibilityLabel",
};
#define kNumMaterialBottomNavigationStrings 1
#define kMaterialBottomNavigationStringsOffset 0
#define kMaterialBottomNavigationStringsEnd 10000
static NSString *const kMaterialBottomNavigationStringsTableName = @"MaterialBottomNavigation";

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
- (instancetype)initWithNumItems:(NSInteger)numItems NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
NS_UNAVAILABLE;
- (instancetype)initWithNibName:(NSString *)nibNameOrNil
bundle:(NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
@end
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
NS_UNAVAILABLE;
- (instancetype)initWithNibName:(NSString *)nibNameOrNil
bundle:(NSBundle *)nibBundleOrNil NS_UNAVAILABLE;

@end
2 changes: 0 additions & 2 deletions components/BottomSheet/src/MDCSheetState.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#import <Foundation/Foundation.h>


/**
The MDCSheetState enum provides the different possible states the bottom sheet can be in.
There are currently 3 different states for the bottom sheet:
Expand All @@ -30,4 +29,3 @@ typedef NS_ENUM(NSUInteger, MDCSheetState) {
MDCSheetStatePreferred,
MDCSheetStateExtended
};

2 changes: 1 addition & 1 deletion components/BottomSheet/src/private/MDCDraggableView.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* Delegate for handling drag events.
*/
@property(nonatomic, weak, nullable) id <MDCDraggableViewDelegate> delegate;
@property(nonatomic, weak, nullable) id<MDCDraggableViewDelegate> delegate;

/**
* Initializes a MDCDraggableView.
Expand Down
2 changes: 1 addition & 1 deletion components/BottomSheet/src/private/MDCSheetBehavior.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* Initializes a @c MDCSheetBehavior.
* @param item The dynamic item (a view) to apply the sheet behavior to.
*/
- (nonnull instancetype)initWithItem:(nonnull id <UIDynamicItem>)item NS_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithItem:(nonnull id<UIDynamicItem>)item NS_DESIGNATED_INITIALIZER;

- (nonnull instancetype)init NS_UNAVAILABLE;

Expand Down
Loading

0 comments on commit 9873d9f

Please sign in to comment.