mirror of
https://github.com/zhigang1992/AHAlertView.git
synced 2026-01-12 22:45:42 +08:00
Fixed a retain cycle issue
This commit is contained in:
@@ -204,7 +204,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = AH;
|
||||
LastUpgradeCheck = 0440;
|
||||
LastUpgradeCheck = 0460;
|
||||
ORGANIZATIONNAME = "Auerhaus Development, LLC";
|
||||
};
|
||||
buildConfigurationList = 80C6F0F915FE54A900ABF313 /* Build configuration list for PBXProject "AHAlertViewSample" */;
|
||||
@@ -279,6 +279,9 @@
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
@@ -306,6 +309,9 @@
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
|
||||
@@ -99,11 +99,12 @@ static const NSInteger kAHViewAutoresizingFlexibleMargins =
|
||||
NSString *message = @"This is a message that might prompt you to do something.";
|
||||
|
||||
AHAlertView *alert = [[AHAlertView alloc] initWithTitle:title message:message];
|
||||
__weak AHAlertView *weakAlert = alert;
|
||||
[alert setCancelButtonTitle:@"Tumble" block:^{
|
||||
alert.dismissalStyle = AHAlertViewDismissalStyleTumble;
|
||||
weakAlert.dismissalStyle = AHAlertViewDismissalStyleTumble;
|
||||
}];
|
||||
[alert addButtonWithTitle:@"Zoom Down" block:^{
|
||||
alert.dismissalStyle = AHAlertViewDismissalStyleZoomDown;
|
||||
weakAlert.dismissalStyle = AHAlertViewDismissalStyleZoomDown;
|
||||
}];
|
||||
[alert show];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user