Skip to content

Commit

Permalink
Changes from recent PRs (#86)
Browse files Browse the repository at this point in the history
* Version bump.

* Minimum deployment target 12.

* Xcode dispatching fix.

* the view total height is wrong when use sheet style, because the contentSize for tableView is not correct. For this, add estimatedRowHeight property when tableview init.
  • Loading branch information
NikKovIos authored Sep 5, 2024
1 parent 06c5c06 commit c62e737
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
9 changes: 5 additions & 4 deletions Framework/LGAlertViewFramework.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 4AF138E41BF383530037B073;
Expand Down Expand Up @@ -287,7 +288,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -330,7 +331,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -352,7 +353,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = LGAlertViewFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = LGAlertViewFramework/module.modulemap;
PRODUCT_BUNDLE_IDENTIFIER = "com.Friend-LGA.LGAlertViewFramework";
Expand All @@ -373,7 +374,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = LGAlertViewFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = LGAlertViewFramework/module.modulemap;
PRODUCT_BUNDLE_IDENTIFIER = "com.Friend-LGA.LGAlertViewFramework";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
4 changes: 2 additions & 2 deletions LGAlertView.podspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Pod::Spec.new do |s|

s.name = 'LGAlertView'
s.version = '2.4.0'
s.platform = :ios, '8.0'
s.version = '2.4.1'
s.platform = :ios, '12.0'
s.license = 'MIT'
s.homepage = 'https://github.com/Friend-LGA/LGAlertView'
s.author = { 'Grigory Lutkov' => '[email protected]' }
Expand Down
17 changes: 9 additions & 8 deletions LGAlertView/LGAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -776,14 +776,14 @@ + (nonnull instancetype)alertViewWithTextFieldsAndTitle:(nullable NSString *)tit
cancelButtonTitle:(nullable NSString *)cancelButtonTitle
destructiveButtonTitle:(nullable NSString *)destructiveButtonTitle
delegate:(nullable id<LGAlertViewDelegate>)delegate {
return [[self alloc] alertViewWithTextFieldsAndTitle:title
message:message
numberOfTextFields:numberOfTextFields
textFieldsSetupHandler:textFieldsSetupHandler
buttonTitles:buttonTitles
cancelButtonTitle:cancelButtonTitle
destructiveButtonTitle:destructiveButtonTitle
delegate:delegate];
return [[self alloc] initWithTextFieldsAndTitle:title
message:message
numberOfTextFields:numberOfTextFields
textFieldsSetupHandler:textFieldsSetupHandler
buttonTitles:buttonTitles
cancelButtonTitle:cancelButtonTitle
destructiveButtonTitle:destructiveButtonTitle
delegate:delegate];
}

#pragma mark -
Expand Down Expand Up @@ -2880,6 +2880,7 @@ - (void)subviewsValidateWithSize:(CGSize)size {
self.tableView.delegate = self;
self.tableView.scrollEnabled = NO;
[self.tableView registerClass:[LGAlertViewCell class] forCellReuseIdentifier:@"cell"];
self.tableView.estimatedRowHeight = self.buttonsHeight;
self.tableView.frame = CGRectMake(0.0, 0.0, width, CGFLOAT_MAX);
[self.tableView reloadData];
[self.tableView layoutIfNeeded];
Expand Down

0 comments on commit c62e737

Please sign in to comment.