Skip to content

Commit

Permalink
Revert "Upgrade Xcode version and Objective-C code conventions"
Browse files Browse the repository at this point in the history
  • Loading branch information
TimOliver authored Oct 1, 2023
1 parent db4aec2 commit 2a0da93
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 188 deletions.
30 changes: 15 additions & 15 deletions TORoundedButton/TORoundedButton.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// TORoundedButton.h
//
// Copyright 2019-2023 Timothy Oliver. All rights reserved.
// Copyright 2019 Timothy Oliver. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
Expand All @@ -27,46 +27,46 @@ NS_ASSUME_NONNULL_BEGIN
NS_SWIFT_NAME(RoundedButton)
IB_DESIGNABLE @interface TORoundedButton : UIControl

/// The text that is displayed in center of the button (Default is "Button").
/** The text that is displayed in center of the button (Default is "Button") */
@property (nonatomic, copy) IBInspectable NSString *text;

/// The attributed string used in the label of this button. See `UILabel.attributedText` documentation for full details (Default is nil).
/** The attributed string used in the label of this button. See `UILabel.attributedText` documentation for full details (Default is nil) */
@property (nonatomic, copy, nullable) NSAttributedString *attributedText;

/// The radius of the corners of this button (Default is 12.0f).
/** The radius of the corners of this button (Default is 12.0f) */
@property (nonatomic, assign) IBInspectable CGFloat cornerRadius;

/// The color of the text in this button (Default is white).
/** The color of the text in this button (Default is white) */
@property (nonatomic, strong) IBInspectable UIColor *textColor;

/// When tapped, the level of transparency that the text label animates to. (Defaults to off with 1.0f).
/** When tapped, the level of transparency that the text label animates to. (Defaults to off with 1.0f) */
@property (nonatomic, assign) IBInspectable CGFloat tappedTextAlpha;

/// The font of the text in the button (Default is size UIFontTextStyleBody with bold).
/** The font of the text in the button (Default is size UIFontTextStyleBody with bold) */
@property (nonatomic, strong) UIFont *textFont;

/// Because IB cannot handle fonts, this can alternatively be used to set the font size. (Default is off with 0.0).
/** Because IB cannot handle fonts, this can alternatively be used to set the font size. (Default is off with 0.0) */
@property (nonatomic, assign) IBInspectable CGFloat textPointSize;

/// Taking the default button background color apply a brightness offset for the tapped color (Default is -0.1f. Set 0.0 for off).
/** Taking the default button background color apply a brightness offset for the tapped color (Default is -0.1f. Set 0.0 for off) */
@property (nonatomic, assign) IBInspectable CGFloat tappedTintColorBrightnessOffset;

/// If desired, explicity set the background color of the button when tapped (Default is nil).
/** If desired, explicity set the background color of the button when tapped (Default is nil). */
@property (nonatomic, strong, nullable) IBInspectable UIColor *tappedTintColor;

/// When tapped, the scale by which the button shrinks during the animation (Default is 0.97f).
/** When tapped, the scale by which the button shrinks during the animation (Default is 0.97f) */
@property (nonatomic, assign) IBInspectable CGFloat tappedButtonScale;

/// The duration of the tapping cross-fade animation (Default is 0.4f).
/** The duration of the tapping cross-fade animation (Default is 0.4f) */
@property (nonatomic, assign) CGFloat tapAnimationDuration;

/// Given the current size of the text label, the smallest horizontal width in which this button can scale.
/** Given the current size of the text label, the smallest horizontal width in which this button can scale. */
@property (nonatomic, readonly) CGFloat minimumWidth;

/// A callback handler triggered each time the button is tapped.
/** A callback handler triggered each time the button is tapped. */
@property (nonatomic, copy) void (^tappedHandler)(void);

/// Create a new instance of a button with the provided text shown in the center. The size will be 288 points wide, and 50 tall.
/** Create a new instance with the supplied button text. The size will be 288 points wide, and 50 tall. */
- (instancetype)initWithText:(NSString *)text;

@end
Expand Down
Loading

0 comments on commit 2a0da93

Please sign in to comment.