Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added options for customizing buttons border width and color #34

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
320b9d9
added options for customizing buttons border width and color
schmidt9 Nov 4, 2017
e196699
Avoid hiding text fields by keyboard
schmidt9 Nov 5, 2017
7e44aac
expose view property
schmidt9 Dec 6, 2017
ee5adf9
added dismissBlock property;
schmidt9 Dec 6, 2017
7b955df
refactor (delete commented out code, format code)
schmidt9 Dec 6, 2017
d2bb379
implement iOS-like alert style
schmidt9 Dec 7, 2017
5d35c8a
remove dismissBlock property;
schmidt9 Mar 20, 2018
e292c9b
make actions array untyped;
schmidt9 Mar 27, 2018
80b3654
fix retain cycle because of actions
schmidt9 Jul 11, 2019
734d0ad
fix keyboard size calculation;
schmidt9 Jul 11, 2019
ad77120
add super call in viewDidLoad
schmidt9 Oct 3, 2019
d9b8aaf
fixed returning from methods;
schmidt9 Oct 8, 2019
9abdef5
add TARGET_IS_EXTENSION clause
schmidt9 May 31, 2021
aa99337
do not use sharedApplication
schmidt9 May 31, 2021
fc530d9
add TARGET_IS_EXTENSION
schmidt9 May 31, 2021
7f60863
add APPLICATION_EXTENSION_API_ONLY
schmidt9 Jun 3, 2021
2b762b1
fix APPLICATION_EXTENSION_API_ONLY
schmidt9 Jun 3, 2021
cd8feec
Revert "add TARGET_IS_EXTENSION"
schmidt9 Jun 3, 2021
0ed15bc
reformat
schmidt9 Feb 9, 2022
8e5f7c6
reformat
schmidt9 Feb 10, 2022
09d6c30
remove unused properties
schmidt9 Feb 10, 2022
2975a84
reformat
schmidt9 Feb 10, 2022
f6448c0
add maximum height property;
schmidt9 Feb 10, 2022
24e8638
add maximum height property
schmidt9 Feb 10, 2022
6451904
test corner radius
schmidt9 Feb 11, 2022
75e8700
test corner radius
schmidt9 Feb 11, 2022
7735129
cleanup
schmidt9 Feb 11, 2022
8a67728
reformat;
schmidt9 Feb 12, 2022
ae7169e
add isFullScreen property
schmidt9 Feb 14, 2022
674c60b
revert buttons layout
schmidt9 Feb 14, 2022
2c0cfb5
move NYAlertTextView declaration to header;
schmidt9 Feb 14, 2022
a6fbc63
add height constraint for text fields container
schmidt9 Feb 14, 2022
d2b5575
add type to actions property
schmidt9 Feb 22, 2022
71123ad
fix buttons state
schmidt9 Feb 22, 2022
60db323
refactor
schmidt9 Mar 9, 2022
64833cd
fix background view vertical positioning
schmidt9 Mar 9, 2022
19cc067
fix message text view height
schmidt9 Mar 9, 2022
feca6f7
fix margins on full screen
schmidt9 Mar 9, 2022
a2d3be4
fix message text view height calculation
schmidt9 Mar 9, 2022
846bc65
add accessibility identifiers;
schmidt9 Mar 29, 2022
22545d2
adjust alert height
schmidt9 Mar 29, 2022
cfa045d
Update NYAlertViewController.podspec
schmidt9 May 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions NYAlertViewController.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "NYAlertViewController"
s.version = "1.3.0"
s.version = "1.4.0"
s.summary = "Highly Customizable iOS Alert Views"
s.description = "Replacement for UIAlertController/UIAlertView with support for content views and UI customization"
s.homepage = "https://github.com/nealyoung/NYAlertViewController"
Expand All @@ -9,7 +9,12 @@ Pod::Spec.new do |s|
s.author = { "Neal Young" => "[email protected]" }
s.social_media_url = "http://nealyoung.me"
s.platform = :ios, "8.0"
s.source = { :git => "https://github.com/nealyoung/NYAlertViewController.git", :tag => "#{s.version}" }
s.source = { :git => "https://github.com/schmidt9/NYAlertViewController.git", :tag => "#{s.version}" }
s.source_files = "NYAlertViewController/*.{h,m}"
s.requires_arc = true

s.pod_target_xcconfig = {
# fix for "'sharedApplication' is unavailable: not available on iOS (App Extension)"
"APPLICATION_EXTENSION_API_ONLY" => "NO"
}
end
35 changes: 31 additions & 4 deletions NYAlertViewController/NYAlertView.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,40 @@ typedef NS_ENUM(NSInteger, NYAlertViewButtonType) {
NYAlertViewButtonTypeBordered
};

typedef NS_ENUM(NSInteger, NYAlertViewStyle) {
NYAlertViewStyleDefault,
NYAlertViewStyleIOSCustom
};

@interface UIButton (BackgroundColor)

- (void)setBackgroundColor:(UIColor *)color forState:(UIControlState)state;

@end

@interface NYAlertTextView : UITextView
@end

@interface NYAlertViewButton : UIButton

@property (nonatomic) NYAlertViewButtonType type;

@property (nonatomic) UIColor *borderColor;
@property (nonatomic) UIColor *borderedTitleColor;

@property (nonatomic) CGFloat borderWidth;
@property (nonatomic) CGFloat cornerRadius;

@end

@interface NYAlertView : UIView

@property UILabel *titleLabel;
@property UITextView *messageTextView;
- (instancetype)initWithStyle:(NYAlertViewStyle)style;

@property (nonatomic) NYAlertViewStyle style;

@property (nonatomic) UILabel *titleLabel;
@property (nonatomic) NYAlertTextView *messageTextView;
@property (nonatomic) UIView *contentView;

@property (nonatomic) UIFont *buttonTitleFont;
Expand All @@ -43,16 +59,27 @@ typedef NS_ENUM(NSInteger, NYAlertViewButtonType) {
@property (nonatomic) UIColor *destructiveButtonColor;
@property (nonatomic) UIColor *destructiveButtonTitleColor;

@property (nonatomic) NSString *title;
@property (nonatomic) CGFloat buttonCornerRadius;
@property (nonatomic) CGFloat maximumWidth;
/**
* Shows content in full screen mode (but not covering status bar).
*/
@property (nonatomic) BOOL isFullScreen;

@property (nonatomic, readonly) UIView *alertBackgroundView;

@property (nonatomic, readonly) NSLayoutConstraint *backgroundViewVerticalCenteringConstraint;
@property (nonatomic, readonly) NSLayoutConstraint *messageTextViewHeightConstraint;

//@property (nonatomic) NSArray *actions;
@property (nonatomic) NSArray *actionButtons;
@property (nonatomic) NSArray<UIButton *> *actionButtons;

@property (nonatomic) NSArray<UITextField *> *textFields;

/// View from contentView which should be visible, overrides first responder / active text field
@property (nonatomic) UIView *keyboardEscapingView;

@property (nonatomic) NSArray *textFields;
- (void)updateMessageTextViewHeight;

@end
Loading