├── AlertView ├── Assets.xcassets │ ├── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── ViewController.h ├── AppDelegate.h ├── main.m ├── MLAlertView │ ├── NSString+AttributedString.h │ ├── UIView+MLExtension.h │ ├── MLAlertView.h │ ├── NSString+AttributedString.m │ ├── UIView+MLExtension.m │ └── MLAlertView.m ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── AppDelegate.m └── ViewController.m ├── AlertView.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ ├── admin.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ └── mac.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ ├── admin.xcuserdatad │ │ ├── xcschemes │ │ │ └── xcschememanagement.plist │ │ └── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ └── mac.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── AlertViewTests ├── Info.plist └── AlertViewTests.m ├── AlertViewUITests ├── Info.plist └── AlertViewUITests.m └── README.md /AlertView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AlertView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AlertView.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longmaboy/AlertView/HEAD/AlertView.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AlertView.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longmaboy/AlertView/HEAD/AlertView.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AlertView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // AlertView 4 | // 5 | // Created by Admin on 2018/6/6. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /AlertView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AlertView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AlertView 4 | // 5 | // Created by Admin on 2018/6/6. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /AlertView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AlertView 4 | // 5 | // Created by Admin on 2018/6/6. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AlertView.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AlertView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AlertView.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AlertView.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AlertView.xcodeproj/xcuserdata/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /AlertViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AlertViewUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AlertView/MLAlertView/NSString+AttributedString.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+AttributedString.h 3 | // AlertView 4 | // 5 | // Created by Admin on 2018/6/8. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface NSString (AttributedString) 13 | 14 | /** 15 | * 设置段落样式 16 | * @param lineSpeace 行距 17 | * @param label 传入前先给label设置好 18 | * @返回 富文本 19 | */ 20 | - (NSAttributedString *)stringWithParagraphlineSpeace:(CGFloat)lineSpeace andAlignment:(NSTextAlignment)alignment andLabel:(UILabel *)label; 21 | 22 | /** 23 | * 计算富文本字体高度 24 | * @param lineSpeace 行距 25 | * @param label 传入前先给label设置好 26 | * @param width 字体所占宽度 27 | * @返回 富文本高度 28 | */ 29 | - (CGFloat)getSpaceLabelHeightwithSpeace:(CGFloat)lineSpeace withLabel:(UILabel *)label andAlignment:(NSTextAlignment)alignment andWidth:(CGFloat)width; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /AlertView/MLAlertView/UIView+MLExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MLExtension.h 3 | // 4 | // 5 | // Created by Mac on 2017/9/6. 6 | // Copyright © 2017年 MLB. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (MLExtension) 12 | /** 起点x坐标 */ 13 | @property (nonatomic, assign) CGFloat x; 14 | /** 起点y坐标 */ 15 | @property (nonatomic, assign) CGFloat y; 16 | /** 中心点x坐标 */ 17 | @property (nonatomic, assign) CGFloat centerX; 18 | /** 中心点y坐标 */ 19 | @property (nonatomic, assign) CGFloat centerY; 20 | /** 宽度 */ 21 | @property (nonatomic, assign) CGFloat width; 22 | /** 高度 */ 23 | @property (nonatomic, assign) CGFloat height; 24 | /** 顶部 */ 25 | @property (nonatomic, assign) CGFloat top; 26 | /** 底部 */ 27 | @property (nonatomic, assign) CGFloat bottom; 28 | /** 左边 */ 29 | @property (nonatomic, assign) CGFloat left; 30 | /** 右边 */ 31 | @property (nonatomic, assign) CGFloat right; 32 | /** size */ 33 | @property (nonatomic, assign) CGSize size; 34 | /** origin */ 35 | @property (nonatomic, assign) CGPoint origin; 36 | 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /AlertViewTests/AlertViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AlertViewTests.m 3 | // AlertViewTests 4 | // 5 | // Created by Admin on 2018/6/6. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AlertViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AlertViewTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /AlertViewUITests/AlertViewUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AlertViewUITests.m 3 | // AlertViewUITests 4 | // 5 | // Created by Admin on 2018/6/6. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AlertViewUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AlertViewUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /AlertView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /AlertView/MLAlertView/MLAlertView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLAlertView.h 3 | // AlertView 4 | // 5 | // Created by Admin on 2018/6/6. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MLAlertView : UIView 12 | 13 | /** 14 | * view创建方法 15 | * @param title 大标题 16 | * @param message 副标题或描述 17 | * @param textAlignment 副标题或描述 的字体位置 如果没有设置副标题,则设置无效 18 | * @param itemArr 按钮item数组 不设置则弹出view无法消失,按钮最多3个,多设置取前3 19 | */ 20 | - (instancetype)initWithTitle:(NSString *)title andMessage:(NSString *)message andMessageAlignment:(NSTextAlignment)textAlignment andItem:(NSArray *)itemArr andSelectBlock:(void(^)(NSInteger index))selectBlock; 21 | 22 | /** 23 | * view显示方法 24 | * @param view 传入俯父视图view 25 | */ 26 | - (void)showWithView:(UIView *)view; 27 | 28 | 29 | /** 大标题title的字体大小 */ 30 | @property (nonatomic, strong) UIFont * titleLabelFont; 31 | 32 | /** 大标题title的字体颜色 */ 33 | @property (nonatomic, strong) UIColor * titleLabelColor; 34 | 35 | /** 副标题或描述message的字体颜色 */ 36 | @property (nonatomic, strong) UIColor * messageLabelColor; 37 | 38 | /** 按钮item的字体大小 */ 39 | @property (nonatomic, strong) UIFont * buttonFont; 40 | 41 | /** 横线和竖线的颜色 */ 42 | @property (nonatomic, strong) UIColor * lineViewColor; 43 | 44 | /** 是否隐藏横线 默认为NO不隐藏 要隐藏设为YES*/ 45 | @property (nonatomic, assign) BOOL transverseLineHidden; 46 | 47 | /** 总共最多3个item 按顺序把颜色放数组里面就行了,没item设置无效,多设置按顺序取 */ 48 | @property (nonatomic, strong) NSArray * itemTitleColorArr; 49 | 50 | /** 设置副标题某段文字的颜色 如果设置了副标题颜色messageLabelColor,必须放在前面,否则此处设置无效,会被messageLabelColor覆盖,如果没有副标题则此处设置无效 */ 51 | - (void)messageLabelTextColorWith:(NSRange)range andColor:(UIColor *)color; 52 | 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /AlertView/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AlertView/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /AlertView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AlertView 4 | // 5 | // Created by Admin on 2018/6/6. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /AlertView/MLAlertView/NSString+AttributedString.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+AttributedString.m 3 | // AlertView 4 | // 5 | // Created by Admin on 2018/6/8. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import "NSString+AttributedString.h" 10 | 11 | @implementation NSString (AttributedString) 12 | 13 | /** 14 | * 设置段落样式 15 | * @param lineSpeace 行距 16 | * @param label 传入前先给label设置好 17 | * @返回 富文本 18 | */ 19 | - (NSAttributedString *)stringWithParagraphlineSpeace:(CGFloat)lineSpeace andAlignment:(NSTextAlignment)alignment andLabel:(UILabel *)label 20 | { 21 | // 设置段落 22 | NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init]; 23 | 24 | // 行间距 25 | paragraphStyle.lineSpacing = lineSpeace; 26 | 27 | paragraphStyle.alignment = alignment; 28 | 29 | paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping; 30 | 31 | // NSKernAttributeName字体间距 32 | NSDictionary *attributes = @{NSFontAttributeName:label.font, NSParagraphStyleAttributeName:paragraphStyle, NSKernAttributeName:@0.8f }; 33 | 34 | NSMutableAttributedString *attriStr = [[NSMutableAttributedString alloc] initWithString:self attributes:attributes]; 35 | 36 | // 创建文字属性 37 | NSDictionary * attriBute = @{NSForegroundColorAttributeName:label.textColor, NSFontAttributeName:label.font}; 38 | 39 | [attriStr addAttributes:attriBute range:NSMakeRange(0, self.length)]; 40 | 41 | return attriStr; 42 | } 43 | 44 | /** 45 | * 计算富文本字体高度 46 | * @param lineSpeace 行距 47 | * @param label 传入前先给label设置好 48 | * @param width 字体所占宽度 49 | * @返回 富文本高度 50 | */ 51 | - (CGFloat)getSpaceLabelHeightwithSpeace:(CGFloat)lineSpeace withLabel:(UILabel *)label andAlignment:(NSTextAlignment)alignment andWidth:(CGFloat)width; 52 | { 53 | // 设置段落 54 | NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init]; 55 | 56 | // 行间距 57 | paragraphStyle.lineSpacing = lineSpeace; 58 | 59 | paragraphStyle.alignment = alignment; 60 | 61 | paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping; 62 | 63 | //NSKernAttributeName字体间距 64 | NSDictionary *attributes = @{NSFontAttributeName:label.font, NSParagraphStyleAttributeName:paragraphStyle, NSKernAttributeName:@0.8f }; 65 | 66 | CGSize size = [self boundingRectWithSize:CGSizeMake(width, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil].size; 67 | 68 | return size.height; 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /AlertView/MLAlertView/UIView+MLExtension.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MLExtension.m 3 | // 4 | // 5 | // Created by Mac on 2017/9/6. 6 | // Copyright © 2017年 MLB. All rights reserved. 7 | // 8 | 9 | #import "UIView+MLExtension.h" 10 | 11 | @implementation UIView (MLExtension) 12 | - (void)setX:(CGFloat)x { 13 | CGRect frame = self.frame; 14 | frame.origin.x = x; 15 | self.frame = frame; 16 | } 17 | 18 | - (void)setY:(CGFloat)y { 19 | CGRect frame = self.frame; 20 | frame.origin.y = y; 21 | self.frame = frame; 22 | } 23 | 24 | - (CGFloat)x { 25 | return self.frame.origin.x; 26 | } 27 | 28 | - (CGFloat)y { 29 | return self.frame.origin.y; 30 | } 31 | 32 | - (void)setCenterX:(CGFloat)centerX { 33 | 34 | CGPoint center = self.center; 35 | center.x = centerX; 36 | self.center = center; 37 | 38 | } 39 | 40 | - (CGFloat)centerX { 41 | return self.center.x; 42 | } 43 | 44 | - (void)setCenterY:(CGFloat)centerY{ 45 | CGPoint center = self.center; 46 | center.y = centerY; 47 | self.center = center; 48 | } 49 | 50 | - (CGFloat)centerY { 51 | return self.center.y; 52 | } 53 | 54 | - (void)setWidth:(CGFloat)width { 55 | CGRect frame = self.frame; 56 | frame.size.width = width; 57 | self.frame = frame; 58 | } 59 | 60 | - (void)setHeight:(CGFloat)height { 61 | CGRect frame = self.frame; 62 | frame.size.height = height; 63 | self.frame = frame; 64 | } 65 | 66 | - (CGFloat)height { 67 | return self.frame.size.height; 68 | } 69 | 70 | - (CGFloat)width { 71 | return self.frame.size.width; 72 | } 73 | 74 | - (void)setSize:(CGSize)size { 75 | CGRect frame = self.frame; 76 | frame.size = size; 77 | self.frame = frame; 78 | } 79 | 80 | - (CGSize)size { 81 | return self.frame.size; 82 | } 83 | 84 | - (void)setOrigin:(CGPoint)origin { 85 | CGRect frame = self.frame; 86 | frame.origin = origin; 87 | self.frame = frame; 88 | } 89 | 90 | - (CGPoint)origin { 91 | return self.frame.origin; 92 | } 93 | - (CGFloat)top { 94 | return self.frame.origin.y; 95 | } 96 | 97 | - (void)setTop:(CGFloat)top { 98 | CGRect frame = self.frame; 99 | frame.origin.y = top; 100 | self.frame = frame; 101 | } 102 | 103 | - (CGFloat)left { 104 | return self.frame.origin.x; 105 | } 106 | 107 | - (void)setLeft:(CGFloat)left { 108 | CGRect frame = self.frame; 109 | frame.origin.x = left; 110 | self.frame = frame; 111 | } 112 | 113 | - (CGFloat)bottom { 114 | return self.frame.size.height + self.frame.origin.y; 115 | } 116 | 117 | - (void)setBottom:(CGFloat)bottom { 118 | CGRect frame = self.frame; 119 | frame.origin.y = bottom - frame.size.height; 120 | self.frame = frame; 121 | } 122 | 123 | - (CGFloat)right { 124 | return self.frame.size.width + self.frame.origin.x; 125 | } 126 | 127 | - (void)setRight:(CGFloat)right { 128 | CGRect frame = self.frame; 129 | frame.origin.x = right - frame.size.width; 130 | self.frame = frame; 131 | } 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /AlertView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AlertView 2 | 这个一个与系统UIAlertController相似的中间弹出的alertView,写这个是为了方便修改字体颜色、字体大小、间距等,现在的美工很膨胀,什么款都能搞出来!~~~ 3 | 4 | # 先看效果图 5 | 6 | ![Image text](https://github.com/longmaboy/Financial/blob/master/Image/alert1.png) 7 | ![Image text](https://github.com/longmaboy/Financial/blob/master/Image/alert2.png) 8 | ![Image text](https://github.com/longmaboy/Financial/blob/master/Image/alert3.png) 9 | ![Image text](https://github.com/longmaboy/Financial/blob/master/Image/alert4.png) 10 | ![Image text](https://github.com/longmaboy/Financial/blob/master/Image/alert5.png) 11 | ![Image text](https://github.com/longmaboy/Financial/blob/master/Image/alert6.png) 12 | 13 | # 使用方法 将轮子文件夹MLAlertView拖到自己项目导入#import "MLAlertView.h"即可 14 | 15 | 1.创建 16 | 17 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:@"提交成功" andMessage:@"上海港货物吞吐量和集装箱吞吐量均居世界第一" andMessageAlignment:NSTextAlignmentCenter andItem:@[@"知道了"] andSelectBlock:^(NSInteger index) { 18 | 19 | NSLog(@"index->%ld",index); 20 | 21 | }]; 22 | 23 | 2.设置需要的属性 24 | 25 | //横线和竖线的颜色 26 | alert.lineViewColor = [UIColor colorWithRed:220/255.0 green:220/255.0 blue:220/255.0 alpha:1]; 27 | 28 | //副标题或描述的字体颜色 29 | alert.messageLabelColor = [UIColor redColor]; 30 | 31 | //按钮item的颜色数组 按顺序取 实际最多只有3个按钮 如果颜色数组只有两个颜色,则最后一个颜色按钮是默认色,如果颜色数组颜色多了,只取前3个值 32 | NSArray *colorArr = @[[UIColor greenColor]]; 33 | alert.itemTitleColorArr = colorArr; 34 | 35 | //副标题或描述的颜色 36 | alert.messageLabelColor = [UIColor grayColor]; 37 | 38 | alert.buttonFont = [UIFont systemFontOfSize:18 weight:550]; 39 | 40 | alert.transverseLineHidden = YES; 41 | 42 | //设置副标题某段文字的颜色 如果设置了副标题颜色messageLabelColor,必须放在前面,否则此处设置无效,会被messageLabelColor覆盖,没有设置副标题则此处设置无效 43 | [alert messageLabelTextColorWith:NSMakeRange(15, 6) andColor:[UIColor orangeColor]]; 44 | 45 | 3.调用下面之一的show方法就可以弹出来了 46 | 47 | if (self.tabBarController.view) { 48 | 49 | [alert showWithView:self.tabBarController.view]; 50 | 51 | }else if (self.navigationController.view) { 52 | 53 | [alert showWithView:self.navigationController.view]; 54 | 55 | }else{ 56 | 57 | [alert showWithView:self.view]; 58 | 59 | } 60 | 61 | # .h文件一览 62 | 63 | #import 64 | 65 | @interface MLAlertView : UIView 66 | 67 | /** 68 | * view创建方法 69 | * @param title 大标题 70 | * @param message 副标题或描述 71 | * @param textAlignment 副标题或描述 的字体位置 如果没有设置副标题,则设置无效 72 | * @param itemArr 按钮item数组 不设置则弹出view无法消失,按钮最多3个,多设置取前3 73 | */ 74 | - (instancetype)initWithTitle:(NSString *)title andMessage:(NSString *)message andMessageAlignment:(NSTextAlignment)textAlignment andItem:(NSArray *)itemArr andSelectBlock:(void(^)(NSInteger index))selectBlock; 75 | 76 | /** 77 | * view显示方法 78 | * @param view 传入俯父视图view 79 | */ 80 | - (void)showWithView:(UIView *)view; 81 | 82 | 83 | /** 大标题title的字体大小 */ 84 | @property (nonatomic, strong) UIFont * titleLabelFont; 85 | 86 | /** 大标题title的字体颜色 */ 87 | @property (nonatomic, strong) UIColor * titleLabelColor; 88 | 89 | /** 副标题或描述message的字体颜色 */ 90 | @property (nonatomic, strong) UIColor * messageLabelColor; 91 | 92 | /** 按钮item的字体大小 */ 93 | @property (nonatomic, strong) UIFont * buttonFont; 94 | 95 | /** 横线和竖线的颜色 */ 96 | @property (nonatomic, strong) UIColor * lineViewColor; 97 | 98 | /** 是否隐藏横线 默认为NO不隐藏 要隐藏设为YES*/ 99 | @property (nonatomic, assign) BOOL transverseLineHidden; 100 | 101 | /** 总共最多3个item 按顺序把颜色放数组里面就行了,没item设置无效,多设置按顺序取 */ 102 | @property (nonatomic, strong) NSArray * itemTitleColorArr; 103 | 104 | /** 设置副标题某段文字的颜色 如果设置了副标题颜色messageLabelColor,必须放在前面,否则此处设置无效,会被messageLabelColor覆盖,如果没有副标题则此处设置无效 */ 105 | - (void)messageLabelTextColorWith:(NSRange)range andColor:(UIColor *)color; 106 | 107 | 108 | @end 109 | 110 | # .m里面的基本属性设置,可根据自己UI修改 111 | 112 | /*********基本配置 可根据自身UI风格适当修改**********/ 113 | /** 属性赋值配置不可删除 删除之后可能因为取不到值就蹦了 */ 114 | - (void)defaultValueMethod 115 | { 116 | //自身背景色 117 | self.backgroundColor = [UIColor whiteColor]; 118 | 119 | self.layer.masksToBounds = YES; 120 | self.layer.cornerRadius = 10; 121 | 122 | //自身弹出alertView的宽度 屏幕宽*(0.5~0.9之间最佳) 123 | viewWith = [UIScreen mainScreen].bounds.size.width*0.8; 124 | 125 | //title距离顶部的距离 可适当修改 126 | viewTop = 30; 127 | 128 | //副标题或描述距离左右的距离 可适当修改 129 | viewLeftRight = 20; 130 | 131 | //副标题或描述的字体大小 132 | messageLabelFont = 16; 133 | 134 | //副标题或描述多行情况下上下两行间的行距 可适当修改 135 | messageLineSpace = 4; 136 | 137 | //副标题或描述与横线之间的距离 大于0 适当调 138 | msgAndLineViewSpace = 20; 139 | 140 | //titleLabel最顶上大标题占的高度 可适当修改 141 | titleHeight = 22; 142 | 143 | //底部按钮item占的高度 可适当修改 144 | btnHeight = 50; 145 | 146 | //自身背景灰色的alpha 0~1 可适当修改 越大越灰 147 | bgViewAlpha = 0.8; 148 | 149 | } 150 | 151 | 152 | -------------------------------------------------------------------------------- /AlertView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // AlertView 4 | // 5 | // Created by Admin on 2018/6/6. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "MLAlertView.h" 11 | 12 | @interface ViewController () 13 | @property (nonatomic, strong) UITableView * tableView; 14 | @property (nonatomic, strong) NSArray * titleArr; 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view, typically from a nib. 23 | 24 | self.title = @"MLAlertView"; 25 | 26 | _titleArr = @[@"title+item", @"message+item", @"message+item+hidden-line", @"all", @"all-2", @"title+mesage+item1", @"mesage+item1", @"mesage+item1-2", @"系统的alert"]; 27 | 28 | [self.tableView reloadData]; 29 | 30 | 31 | } 32 | 33 | #pragma mark - creatUI lazy 34 | 35 | - (UITableView *)tableView 36 | { 37 | if (!_tableView) { 38 | _tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain]; 39 | _tableView.delegate = self; 40 | _tableView.dataSource = self; 41 | [self.view addSubview:_tableView]; 42 | 43 | _tableView.tableFooterView = [UIView new]; 44 | 45 | _tableView.separatorInset = UIEdgeInsetsMake(0, 50, 0, 50); 46 | 47 | } 48 | return _tableView; 49 | } 50 | 51 | #pragma mark - delegateMethod 52 | 53 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 54 | { 55 | return self.titleArr.count; 56 | } 57 | 58 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 59 | { 60 | static NSString *identifier = @"cell"; 61 | 62 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; 63 | 64 | if (!cell) { 65 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; 66 | } 67 | 68 | cell.textLabel.text = [NSString stringWithFormat:@"style->%@",self.titleArr[indexPath.row]]; 69 | 70 | 71 | return cell; 72 | } 73 | 74 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 75 | { 76 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 77 | 78 | if (indexPath.row == 0) {//title+item 79 | 80 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:@"提交成功" andMessage:nil andMessageAlignment:NSTextAlignmentLeft andItem:@[@"取消",@"确定"] andSelectBlock:^(NSInteger index) { 81 | 82 | NSLog(@"index->%ld",index); 83 | 84 | }]; 85 | 86 | [alert messageLabelTextColorWith:NSMakeRange(3, 5) andColor:[UIColor redColor]]; 87 | 88 | 89 | alert.titleLabelFont = [UIFont systemFontOfSize:20 weight:550]; 90 | 91 | [alert showWithView:self.navigationController.view]; 92 | 93 | }else if (indexPath.row == 1) {//message+item 94 | 95 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:nil andMessage:@"上海港货物吞吐量和集装箱吞吐量均居世界第一,设有中国大陆首个自贸区中国(上海)自由贸易试验区。上海市与安徽、江苏、浙江共同构成了长江三角洲城市群,是世界六大城市群之一。" andMessageAlignment:NSTextAlignmentCenter andItem:@[@"取消",@"确定"] andSelectBlock:^(NSInteger index) { 96 | 97 | NSLog(@"index->%ld",index); 98 | 99 | }]; 100 | 101 | NSArray *colorArr = @[[UIColor greenColor],[UIColor greenColor]]; 102 | alert.itemTitleColorArr = colorArr; 103 | 104 | alert.lineViewColor = [UIColor greenColor]; 105 | 106 | [self alertShow:alert]; 107 | 108 | }else if (indexPath.row == 2) {//message+item 109 | 110 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:nil andMessage:@"上海港货物吞吐量和集装箱吞吐量均居世界第一,设有中国大陆首个自贸区中国(上海)自由贸易试验区。上海市与安徽、江苏、浙江共同构成了长江三角洲城市群,是世界六大城市群之一。" andMessageAlignment:NSTextAlignmentCenter andItem:@[@"取消",@"确定"] andSelectBlock:^(NSInteger index) { 111 | 112 | NSLog(@"index->%ld",index); 113 | 114 | }]; 115 | 116 | [alert messageLabelTextColorWith:NSMakeRange(3, 5) andColor:[UIColor redColor]]; 117 | 118 | NSArray *colorArr = @[[UIColor greenColor],[UIColor greenColor]]; 119 | alert.itemTitleColorArr = colorArr; 120 | 121 | alert.lineViewColor = [UIColor greenColor]; 122 | 123 | alert.transverseLineHidden = YES; 124 | 125 | [self alertShow:alert]; 126 | 127 | } 128 | else if (indexPath.row == 3) {//all 129 | 130 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:@"提交成功" andMessage:@"上海港货物吞吐量和集装箱吞吐量均居世界第一,设有中国大陆首个自贸区中国(上海)自由贸易试验区。上海市与安徽、江苏、浙江共同构成了长江三角洲城市群,是世界六大城市群之一。" andMessageAlignment:NSTextAlignmentLeft andItem:@[@"取消",@"确定",@"知道了"] andSelectBlock:^(NSInteger index) { 131 | 132 | NSLog(@"index->%ld",index); 133 | 134 | }]; 135 | 136 | //横线和竖线的颜色 137 | alert.lineViewColor = [UIColor colorWithRed:220/255.0 green:220/255.0 blue:220/255.0 alpha:1]; 138 | 139 | //按钮item的颜色数组 按顺序取 实际最多只有3个按钮 如果颜色数组只有两个颜色,则最后一个颜色按钮是默认色,如果颜色数组颜色多了,只取前3个值 140 | NSArray *colorArr = @[[UIColor blueColor],[UIColor cyanColor],[UIColor purpleColor],[UIColor redColor]]; 141 | alert.itemTitleColorArr = colorArr; 142 | 143 | //是否隐藏横线 竖线不隐藏 并且变短 144 | //alert.transverseLineHidden = YES; 145 | 146 | //按钮item的字体 147 | alert.buttonFont = [UIFont systemFontOfSize:15 weight:600]; 148 | 149 | 150 | //大标题的颜色 151 | alert.titleLabelColor = [UIColor redColor]; 152 | 153 | //副标题或描述的颜色 154 | alert.messageLabelColor = [UIColor purpleColor]; 155 | 156 | //设置副标题某段文字的颜色 如果设置了副标题颜色messageLabelColor,必须放在前面,否则此处设置无效,会被messageLabelColor覆盖,没有设置副标题则此处设置无效 157 | [alert messageLabelTextColorWith:NSMakeRange(22, 25) andColor:[UIColor greenColor]]; 158 | 159 | 160 | [self alertShow:alert]; 161 | 162 | } 163 | else if (indexPath.row == 4) {//all-2 164 | 165 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:nil andMessage:@"上海港货物吞吐量和集装箱吞吐量均居世界第一,设有中国大陆首个自贸区中国(上海)自由贸易试验区。上海市与安徽、江苏、浙江共同构成了长江三角洲城市群,是世界六大城市群之一。" andMessageAlignment:NSTextAlignmentCenter andItem:@[@"取消",@"确定",@"知道了"] andSelectBlock:^(NSInteger index) { 166 | 167 | NSLog(@"index->%ld",index); 168 | 169 | }]; 170 | 171 | //横线和竖线的颜色 172 | alert.lineViewColor = [UIColor colorWithRed:220/255.0 green:220/255.0 blue:220/255.0 alpha:1]; 173 | 174 | //按钮item的颜色数组 按顺序取 实际最多只有3个按钮 如果颜色数组只有两个颜色,则最后一个颜色按钮是默认色,如果颜色数组颜色多了,只取前3个值 175 | NSArray *colorArr = @[[UIColor blueColor],[UIColor cyanColor],[UIColor purpleColor],[UIColor redColor]]; 176 | alert.itemTitleColorArr = colorArr; 177 | 178 | //是否隐藏横线 竖线不隐藏 并且变短 179 | //alert.transverseLineHidden = YES; 180 | 181 | //按钮item的字体 182 | alert.buttonFont = [UIFont systemFontOfSize:15 weight:600]; 183 | 184 | //副标题或描述的颜色 185 | alert.messageLabelColor = [UIColor greenColor]; 186 | 187 | //设置副标题某段文字的颜色 如果设置了副标题颜色messageLabelColor,必须放在前面,否则此处设置无效,会被messageLabelColor覆盖,没有设置副标题则此处设置无效 188 | [alert messageLabelTextColorWith:NSMakeRange(22, 25) andColor:[UIColor orangeColor]]; 189 | 190 | [self alertShow:alert]; 191 | 192 | }else if (indexPath.row == 5) {//title+mesage+item1 193 | 194 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:@"提交成功" andMessage:@"上海港货物吞吐量和集装箱吞吐量均居世界第一" andMessageAlignment:NSTextAlignmentCenter andItem:@[@"知道了"] andSelectBlock:^(NSInteger index) { 195 | 196 | NSLog(@"index->%ld",index); 197 | 198 | }]; 199 | 200 | //横线和竖线的颜色 201 | alert.lineViewColor = [UIColor colorWithRed:240/255.0 green:240/255.0 blue:240/255.0 alpha:0.8]; 202 | 203 | //副标题或描述的字体颜色 204 | alert.messageLabelColor = [UIColor redColor]; 205 | 206 | //按钮item的颜色数组 按顺序取 实际最多只有3个按钮 如果颜色数组只有两个颜色,则最后一个颜色按钮是默认色,如果颜色数组颜色多了,只取前3个值 207 | NSArray *colorArr = @[[UIColor greenColor]]; 208 | alert.itemTitleColorArr = colorArr; 209 | 210 | //副标题或描述的颜色 211 | alert.messageLabelColor = [UIColor grayColor]; 212 | 213 | //设置副标题某段文字的颜色 如果设置了副标题颜色messageLabelColor,必须放在前面,否则此处设置无效,会被messageLabelColor覆盖,没有设置副标题则此处设置无效 214 | [alert messageLabelTextColorWith:NSMakeRange(4, 7) andColor:[UIColor orangeColor]]; 215 | 216 | [self alertShow:alert]; 217 | 218 | }else if (indexPath.row == 6) {//mesage+item1 219 | 220 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:nil andMessage:@"上海港货物吞吐量和集装箱吞吐量均居世界第一" andMessageAlignment:NSTextAlignmentCenter andItem:@[@"知道了"] andSelectBlock:^(NSInteger index) { 221 | 222 | NSLog(@"index->%ld",index); 223 | 224 | }]; 225 | 226 | //横线和竖线的颜色 227 | alert.lineViewColor = [UIColor colorWithRed:220/255.0 green:220/255.0 blue:220/255.0 alpha:1]; 228 | 229 | //副标题或描述的字体颜色 230 | alert.messageLabelColor = [UIColor redColor]; 231 | 232 | //按钮item的颜色数组 按顺序取 实际最多只有3个按钮 如果颜色数组只有两个颜色,则最后一个颜色按钮是默认色,如果颜色数组颜色多了,只取前3个值 233 | NSArray *colorArr = @[[UIColor greenColor]]; 234 | alert.itemTitleColorArr = colorArr; 235 | 236 | //副标题或描述的颜色 237 | alert.messageLabelColor = [UIColor greenColor]; 238 | 239 | //设置副标题某段文字的颜色 如果设置了副标题颜色messageLabelColor,必须放在前面,否则此处设置无效,会被messageLabelColor覆盖,没有设置副标题则此处设置无效 240 | [alert messageLabelTextColorWith:NSMakeRange(4, 7) andColor:[UIColor orangeColor]]; 241 | 242 | [self alertShow:alert]; 243 | 244 | } 245 | else if (indexPath.row == 7) {//mesage+item1 246 | 247 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:nil andMessage:@"上海港货物吞吐量和集装箱吞吐量均居世界第一" andMessageAlignment:NSTextAlignmentCenter andItem:@[@"知道了"] andSelectBlock:^(NSInteger index) { 248 | 249 | NSLog(@"index->%ld",index); 250 | 251 | }]; 252 | 253 | //横线和竖线的颜色 254 | alert.lineViewColor = [UIColor colorWithRed:220/255.0 green:220/255.0 blue:220/255.0 alpha:1]; 255 | 256 | //副标题或描述的字体颜色 257 | alert.messageLabelColor = [UIColor redColor]; 258 | 259 | //按钮item的颜色数组 按顺序取 实际最多只有3个按钮 如果颜色数组只有两个颜色,则最后一个颜色按钮是默认色,如果颜色数组颜色多了,只取前3个值 260 | NSArray *colorArr = @[[UIColor greenColor]]; 261 | alert.itemTitleColorArr = colorArr; 262 | 263 | //副标题或描述的颜色 264 | alert.messageLabelColor = [UIColor grayColor]; 265 | 266 | alert.buttonFont = [UIFont systemFontOfSize:18 weight:550]; 267 | 268 | alert.transverseLineHidden = YES; 269 | 270 | //设置副标题某段文字的颜色 如果设置了副标题颜色messageLabelColor,必须放在前面,否则此处设置无效,会被messageLabelColor覆盖,没有设置副标题则此处设置无效 271 | [alert messageLabelTextColorWith:NSMakeRange(15, 6) andColor:[UIColor orangeColor]]; 272 | 273 | [self alertShow:alert]; 274 | 275 | }else if (indexPath.row == 8) {//system alert 276 | 277 | [self systemAlert]; 278 | } 279 | } 280 | 281 | //这里只是举例 只用选其一就行 282 | //有tabBarController优先使用self.tabBarController.view 283 | //其次navigationController 284 | //最后才选self.view 285 | - (void)alertShow:(MLAlertView *)alert 286 | { 287 | if (self.tabBarController.view) { 288 | [alert showWithView:self.tabBarController.view]; 289 | }else if (self.navigationController.view) { 290 | [alert showWithView:self.navigationController.view]; 291 | }else{ 292 | [alert showWithView:self.view]; 293 | } 294 | } 295 | 296 | - (void)alertAction 297 | { 298 | MLAlertView *alert = [[MLAlertView alloc] initWithTitle:@"提交成功" andMessage:@"上海港货物吞吐量和集装箱吞吐量均居世界第一,设有中国大陆首个自贸区中国(上海)自由贸易试验区。上海市与安徽、江苏、浙江共同构成了长江三角洲城市群,是世界六大城市群之一。" andMessageAlignment:NSTextAlignmentLeft andItem:@[@"取消",@"确定"] andSelectBlock:^(NSInteger index) { 299 | 300 | NSLog(@"index->%ld",index); 301 | 302 | }]; 303 | 304 | 305 | alert.lineViewColor = [UIColor colorWithRed:220/255.0 green:220/255.0 blue:220/255.0 alpha:1]; 306 | 307 | alert.messageLabelColor = [UIColor redColor]; 308 | 309 | // 310 | // NSArray *colorArr = @[[UIColor blueColor],[UIColor cyanColor],[UIColor purpleColor],[UIColor redColor]]; 311 | // alert.itemTitleColorArr = colorArr; 312 | // 313 | // alert.transverseLineHidden = NO; 314 | // 315 | alert.transverseLineHidden = YES; 316 | // 317 | // alert.buttonFont = [UIFont systemFontOfSize:12 weight:600]; 318 | // 319 | // alert.messageLabelColor = [UIColor yellowColor]; 320 | // 321 | // alert.titleLabelColor = [UIColor redColor]; 322 | 323 | [alert showWithView:self.view]; 324 | } 325 | 326 | - (void)systemAlert 327 | { 328 | UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"确认打卡" message:@"使用此消息会" preferredStyle:UIAlertControllerStyleAlert]; 329 | [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { 330 | 331 | }]]; 332 | [alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { 333 | 334 | }]]; 335 | [self presentViewController:alert animated:YES completion:nil]; 336 | 337 | } 338 | 339 | - (void)didReceiveMemoryWarning { 340 | [super didReceiveMemoryWarning]; 341 | // Dispose of any resources that can be recreated. 342 | } 343 | 344 | 345 | @end 346 | -------------------------------------------------------------------------------- /AlertView/MLAlertView/MLAlertView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLAlertView.m 3 | // AlertView 4 | // 5 | // Created by Admin on 2018/6/6. 6 | // Copyright © 2018年 mlb. All rights reserved. 7 | // 8 | 9 | #import "MLAlertView.h" 10 | #import "UIView+MLExtension.h" 11 | #import "NSString+AttributedString.h" 12 | 13 | typedef void(^FinishBlock)(NSInteger index); 14 | 15 | @interface MLAlertView () 16 | 17 | /** 选中按钮之后的回调block */ 18 | @property (nonatomic, copy) FinishBlock finishBlock; 19 | 20 | /** bgView */ 21 | @property (nonatomic, strong) UIView * maskView; 22 | 23 | /** 最顶上的titleLabel */ 24 | @property (nonatomic, strong) UILabel * titleLabel; 25 | 26 | /** 副标题或描述 */ 27 | @property (nonatomic, strong) UILabel * messageLabel; 28 | 29 | /** 副标题或描述的Alignment */ 30 | @property (nonatomic, assign) NSTextAlignment messageAlignment; 31 | 32 | /** 副标题或描述的部分字体颜色 */ 33 | @property (nonatomic, assign) NSRange range; 34 | 35 | /** 横线 */ 36 | @property (nonatomic, strong) UIView * lineView; 37 | 38 | /** 接收装按钮文字数组的 */ 39 | @property (nonatomic, strong) NSArray * itemArr; 40 | 41 | /** 接收传进来的titleString */ 42 | @property (nonatomic, copy) NSString * titleString; 43 | 44 | /** 接收传进来的messageString */ 45 | @property (nonatomic, copy) NSString * messageString; 46 | 47 | /** 装竖线的数组 */ 48 | @property (nonatomic, strong) NSMutableArray * btnLineArr; 49 | 50 | /** 按钮数组 */ 51 | @property (nonatomic, strong) NSMutableArray * buttonArr; 52 | 53 | @end 54 | 55 | @implementation MLAlertView 56 | { 57 | /** 这里是可修改的一些基本属性 */ 58 | 59 | CGFloat viewWith;//自身弹出alertView的宽度 屏幕宽*(0.5~0.9之间最佳) 60 | 61 | CGFloat viewTop;//title距离顶部的距离 适当调 62 | 63 | CGFloat viewLeftRight;//副标题或描述距离左右的距离 适当调 64 | 65 | CGFloat messageLabelFont;//副标题或描述的字体大小 66 | 67 | CGFloat messageLineSpace;//副标题或描述多行情况下上下两行间的行距 适当调 68 | 69 | CGFloat msgAndLineViewSpace;//副标题或描述与横线之间的距离 大于0 适当调 70 | 71 | CGFloat titleHeight;//titleLabel最顶上大标题占的高度 适当调 72 | 73 | CGFloat btnHeight;//底部按钮item占的高度 适当调 74 | 75 | CGFloat bgViewAlpha;//自身背景灰色的alpha 0~1 越大越灰 76 | 77 | } 78 | 79 | - (instancetype)initWithTitle:(NSString *)title andMessage:(NSString *)message andMessageAlignment:(NSTextAlignment)textAlignment andItem:(NSArray *)itemArr andSelectBlock:(void(^)(NSInteger index))selectBlock 80 | { 81 | self = [super init]; 82 | if (self) { 83 | 84 | //基本配置调用放最前面 85 | [self defaultValueMethod]; 86 | 87 | self.finishBlock = selectBlock; 88 | 89 | self.messageAlignment = textAlignment; 90 | 91 | self.titleString = title; 92 | 93 | self.messageString = message; 94 | 95 | self.itemArr = itemArr; 96 | 97 | //上面收到数据之后 UI布局放最后面,内容决定布局 98 | [self addConstraintsAndActions]; 99 | 100 | } 101 | return self; 102 | } 103 | 104 | /*********基本配置 可根据自身UI风格适当修改**********/ 105 | /** 属性赋值配置不可删除 删除之后可能因为取不到值就蹦了 */ 106 | - (void)defaultValueMethod 107 | { 108 | //自身背景色 109 | self.backgroundColor = [UIColor whiteColor]; 110 | 111 | self.layer.masksToBounds = YES; 112 | self.layer.cornerRadius = 10; 113 | 114 | //自身弹出alertView的宽度 屏幕宽*(0.5~0.9之间最佳) 115 | viewWith = [UIScreen mainScreen].bounds.size.width*0.8; 116 | 117 | //title距离顶部的距离 可适当修改 118 | viewTop = 30; 119 | 120 | //副标题或描述距离左右的距离 可适当修改 121 | viewLeftRight = 20; 122 | 123 | //副标题或描述的字体大小 124 | messageLabelFont = 16; 125 | 126 | //副标题或描述多行情况下上下两行间的行距 可适当修改 127 | messageLineSpace = 4; 128 | 129 | //副标题或描述与横线之间的距离 大于0 适当调 130 | msgAndLineViewSpace = 20; 131 | 132 | //titleLabel最顶上大标题占的高度 可适当修改 133 | titleHeight = 22; 134 | 135 | //底部按钮item占的高度 可适当修改 136 | btnHeight = 50; 137 | 138 | //自身背景灰色的alpha 0~1 可适当修改 越大越灰 139 | bgViewAlpha = 0.8; 140 | 141 | } 142 | 143 | 144 | #pragma mark - creatUI lazy 145 | 146 | - (UILabel *)titleLabel 147 | { 148 | if (!_titleLabel) { 149 | _titleLabel = [UILabel new]; 150 | _titleLabel.textColor = [UIColor blackColor]; 151 | _titleLabel.font = [UIFont systemFontOfSize:18 weight:500]; 152 | _titleLabel.textAlignment = NSTextAlignmentCenter; 153 | [self addSubview:_titleLabel]; 154 | } 155 | return _titleLabel; 156 | } 157 | 158 | - (UILabel *)messageLabel 159 | { 160 | if (!_messageLabel) { 161 | _messageLabel = [UILabel new]; 162 | _messageLabel.textColor = [UIColor colorWithRed:102/255.0 green:102/255.0 blue:102/255.0 alpha:1]; 163 | _messageLabel.font = [UIFont systemFontOfSize:messageLabelFont]; 164 | _messageLabel.textAlignment = self.messageAlignment; 165 | _messageLabel.numberOfLines = 0; 166 | [self addSubview:_messageLabel]; 167 | } 168 | return _messageLabel; 169 | } 170 | 171 | - (UIView *)lineView 172 | { 173 | if (!_lineView) { 174 | _lineView = [UIView new]; 175 | _lineView.backgroundColor = [UIColor grayColor]; 176 | [self addSubview:_lineView]; 177 | } 178 | return _lineView; 179 | } 180 | 181 | - (NSMutableArray *)buttonArr 182 | { 183 | if (!_buttonArr) { 184 | _buttonArr = [NSMutableArray array]; 185 | } 186 | return _buttonArr; 187 | } 188 | 189 | - (NSMutableArray *)btnLineArr 190 | { 191 | if (!_btnLineArr) { 192 | _btnLineArr = [NSMutableArray array]; 193 | } 194 | return _btnLineArr; 195 | } 196 | 197 | #pragma mark - layout 198 | - (void)addConstraintsAndActions 199 | { 200 | 201 | if (!self.titleString.length && !self.messageString.length) { 202 | 203 | self.lineView.frame = CGRectMake(0, 0, viewWith, 0.8); 204 | 205 | NSLog(@"没有title和message"); 206 | }else if (self.titleString.length && !self.messageString.length) { 207 | 208 | self.titleLabel.frame = CGRectMake(viewLeftRight, viewTop, viewWith-viewLeftRight*2, titleHeight); 209 | 210 | self.lineView.frame = CGRectMake(0, self.titleLabel.bottom+msgAndLineViewSpace, viewWith, 0.8); 211 | 212 | }else if (!self.titleString.length && self.messageString.length) { 213 | 214 | self.messageLabel.frame = CGRectMake(viewLeftRight, viewTop, viewWith-viewLeftRight*2, [self.messageString getSpaceLabelHeightwithSpeace:messageLineSpace withLabel:self.messageLabel andAlignment:self.messageAlignment andWidth:viewWith-viewLeftRight*2]); 215 | 216 | self.lineView.frame = CGRectMake(0, self.messageLabel.bottom+msgAndLineViewSpace, viewWith, 0.8); 217 | 218 | }else 219 | { 220 | self.titleLabel.frame = CGRectMake(viewLeftRight, viewTop, viewWith-viewLeftRight*2, titleHeight); 221 | 222 | self.messageLabel.frame = CGRectMake(viewLeftRight, self.titleLabel.bottom+12, viewWith-viewLeftRight*2, [self.messageString getSpaceLabelHeightwithSpeace:messageLineSpace withLabel:self.messageLabel andAlignment:self.messageAlignment andWidth:viewWith-viewLeftRight*2]); 223 | 224 | self.lineView.frame = CGRectMake(0, self.messageLabel.bottom+msgAndLineViewSpace, viewWith, 0.8); 225 | 226 | } 227 | 228 | if (!self.itemArr.count) { 229 | 230 | self.frame = CGRectMake(0, 0, viewWith, self.lineView.bottom); 231 | self.lineView.hidden = YES; 232 | 233 | NSLog(@"没有item点击事件,视图无法消失"); 234 | 235 | }else{ 236 | 237 | self.frame = CGRectMake(0, 0, viewWith, self.lineView.bottom+btnHeight); 238 | 239 | //只做最多3个按钮 240 | [self creatButtonWithCount:(self.itemArr.count > 3 ? 3 : self.itemArr.count)]; 241 | 242 | } 243 | 244 | } 245 | 246 | - (void)creatButtonWithCount:(NSInteger)btncount 247 | { 248 | CGFloat btnW = viewWith/btncount; 249 | CGFloat btnH = btnHeight; 250 | CGFloat btnY = self.lineView.bottom; 251 | 252 | for (int i = 0; i < btncount; i ++) { 253 | 254 | UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(btnW*i, btnY, btnW, btnH)]; 255 | [button setTitle:self.itemArr[i] forState:UIControlStateNormal]; 256 | [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 257 | button.titleLabel.font = [UIFont systemFontOfSize:16]; 258 | [self addSubview:button]; 259 | [button addTarget:self action:@selector(cancelButtonAction:) forControlEvents:UIControlEventTouchUpInside]; 260 | [self.buttonArr addObject:button]; 261 | button.tag = 10+i; 262 | 263 | } 264 | 265 | if (btncount > 1) { 266 | for (int i = 1; i < btncount; i ++) { 267 | 268 | UIView *btnLineView = [[UIView alloc] initWithFrame:CGRectMake(btnW*i, btnY, 0.5, btnH)]; 269 | btnLineView.backgroundColor = [UIColor grayColor]; 270 | [self addSubview:btnLineView]; 271 | [self.btnLineArr addObject:btnLineView]; 272 | 273 | } 274 | } 275 | 276 | } 277 | 278 | #pragma mark - buttonAction 279 | 280 | - (void)cancelButtonAction:(UIButton *)btn 281 | { 282 | __weak typeof(self) weakSelf = self; 283 | [UIView animateWithDuration:0.25 animations:^{ 284 | 285 | self.transform = CGAffineTransformMakeScale(0.0001,0.0001); 286 | weakSelf.maskView.backgroundColor = [UIColor clearColor]; 287 | 288 | } completion:^(BOOL finished) { 289 | [weakSelf.maskView removeFromSuperview]; 290 | weakSelf.maskView = nil; 291 | 292 | if (weakSelf.finishBlock) { 293 | weakSelf.finishBlock(btn.tag-10); 294 | } 295 | 296 | }]; 297 | 298 | } 299 | 300 | - (void)showWithView:(UIView *)view 301 | { 302 | if (view == nil) return; 303 | if (_maskView == nil) { 304 | _maskView = [[UIView alloc] initWithFrame:view.bounds]; 305 | } 306 | 307 | self.maskView.backgroundColor = [UIColor colorWithRed:30/255.0 green:30/255.0 blue:30/255.0 alpha:(bgViewAlpha < 0 && bgViewAlpha > 1) ? 0.5 : bgViewAlpha]; 308 | 309 | [_maskView addSubview:self]; 310 | [view addSubview:_maskView]; 311 | self.center = view.center; 312 | 313 | self.transform = CGAffineTransformMakeScale(0, 0); 314 | [UIView animateWithDuration:0.25 animations:^{ 315 | self.transform = CGAffineTransformIdentity; 316 | }]; 317 | } 318 | 319 | #pragma mark - data 320 | 321 | - (void)setTitleString:(NSString *)titleString 322 | { 323 | if (_titleString != titleString) { 324 | _titleString = titleString; 325 | } 326 | 327 | if (!_titleString.length) return; 328 | 329 | self.titleLabel.text = titleString; 330 | 331 | } 332 | 333 | - (void)setMessageString:(NSString *)messageString 334 | { 335 | if (_messageString != messageString) { 336 | _messageString = messageString; 337 | } 338 | 339 | if (!_messageString.length) return; 340 | 341 | self.messageLabel.text = messageString; 342 | self.messageLabel.attributedText = [messageString stringWithParagraphlineSpeace:messageLineSpace andAlignment:self.messageAlignment andLabel:self.messageLabel]; 343 | 344 | } 345 | 346 | - (void)setLineViewColor:(UIColor *)lineViewColor 347 | { 348 | if (_lineViewColor != lineViewColor) { 349 | _lineViewColor = lineViewColor; 350 | } 351 | 352 | _lineView.backgroundColor = lineViewColor; 353 | 354 | for (int i = 0; i < self.btnLineArr.count; i ++) { 355 | 356 | UIView *btnLineView = self.btnLineArr[i]; 357 | btnLineView.backgroundColor = lineViewColor; 358 | } 359 | 360 | } 361 | 362 | - (void)setItemTitleColorArr:(NSArray *)itemTitleColorArr 363 | { 364 | if (_itemTitleColorArr != itemTitleColorArr) { 365 | _itemTitleColorArr = itemTitleColorArr; 366 | } 367 | 368 | if (self.buttonArr.count < 1) { 369 | 370 | NSLog(@"没有item"); 371 | return; 372 | } 373 | if (itemTitleColorArr.count < 1) { 374 | 375 | NSLog(@"没有颜色"); 376 | return; 377 | } 378 | 379 | if (self.buttonArr.count > self.itemTitleColorArr.count) { 380 | 381 | for (int i = 0; i < itemTitleColorArr.count; i ++) { 382 | 383 | UIButton *button = self.buttonArr[i]; 384 | [button setTitleColor:self.itemTitleColorArr[i] forState:UIControlStateNormal]; 385 | } 386 | }else{ 387 | 388 | for (int i = 0; i < self.buttonArr.count; i ++) { 389 | 390 | UIButton *button = self.buttonArr[i]; 391 | [button setTitleColor:self.itemTitleColorArr[i] forState:UIControlStateNormal]; 392 | } 393 | } 394 | } 395 | 396 | - (void)setTransverseLineHidden:(BOOL)transverseLineHidden 397 | { 398 | if (_transverseLineHidden != transverseLineHidden) { 399 | _transverseLineHidden = transverseLineHidden; 400 | } 401 | 402 | self.lineView.hidden = transverseLineHidden; 403 | 404 | if (transverseLineHidden) { 405 | 406 | for (int i = 0; i < self.btnLineArr.count; i ++) { 407 | 408 | UIView *btnLineView = self.btnLineArr[i]; 409 | btnLineView.height = btnHeight*0.4; 410 | btnLineView.top += btnHeight*0.3; 411 | //btnLineView.hidden = YES;//设置隐藏竖线 412 | } 413 | 414 | }else{ 415 | 416 | for (int i = 0; i < self.btnLineArr.count; i ++) { 417 | 418 | UIView *btnLineView = self.btnLineArr[i]; 419 | btnLineView.height = btnHeight; 420 | btnLineView.top = self.lineView.bottom; 421 | //btnLineView.hidden = NO; 422 | } 423 | } 424 | 425 | } 426 | 427 | - (void)setButtonFont:(UIFont *)buttonFont 428 | { 429 | if (_buttonFont != buttonFont) { 430 | _buttonFont = buttonFont; 431 | } 432 | 433 | for (int i = 0; i < self.buttonArr.count; i ++) { 434 | 435 | UIButton *button = self.buttonArr[i]; 436 | button.titleLabel.font = buttonFont; 437 | } 438 | } 439 | 440 | - (void)setTitleLabelFont:(UIFont *)titleLabelFont 441 | { 442 | if (_titleLabelFont != titleLabelFont) { 443 | _titleLabelFont = titleLabelFont; 444 | } 445 | 446 | if (!_titleLabel) return; 447 | 448 | _titleLabel.font = titleLabelFont; 449 | 450 | } 451 | 452 | - (void)setTitleLabelColor:(UIColor *)titleLabelColor 453 | { 454 | if (_titleLabelColor != titleLabelColor) { 455 | _titleLabelColor = titleLabelColor; 456 | } 457 | 458 | if (!_titleLabel) return; 459 | 460 | _titleLabel.textColor = titleLabelColor; 461 | 462 | } 463 | 464 | - (void)setMessageLabelColor:(UIColor *)messageLabelColor 465 | { 466 | if (_messageLabelColor != messageLabelColor) { 467 | _messageLabelColor = messageLabelColor; 468 | } 469 | 470 | if (!_messageLabel) return; 471 | 472 | NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithAttributedString:_messageLabel.attributedText]; 473 | // 创建文字属性 474 | NSDictionary * attriBute = @{NSForegroundColorAttributeName:messageLabelColor, NSFontAttributeName:self.messageLabel.font }; 475 | [attri addAttributes:attriBute range:NSMakeRange(0, self.messageString.length)]; 476 | _messageLabel.attributedText = attri; 477 | 478 | } 479 | 480 | - (void)messageLabelTextColorWith:(NSRange)range andColor:(UIColor *)color 481 | { 482 | if (!_messageLabel) return; 483 | 484 | NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithAttributedString:_messageLabel.attributedText]; 485 | [attri addAttribute:NSForegroundColorAttributeName value:color range:range]; 486 | _messageLabel.attributedText = attri; 487 | } 488 | 489 | 490 | - (void)dealloc 491 | { 492 | NSLog(@"-----dealloc----"); 493 | } 494 | 495 | @end 496 | -------------------------------------------------------------------------------- /AlertView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 84A4E33920CA5D03005A6DE2 /* NSString+AttributedString.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A4E33820CA5D03005A6DE2 /* NSString+AttributedString.m */; }; 11 | 84D42C1320C7B9E400ABFD79 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D42C1220C7B9E400ABFD79 /* AppDelegate.m */; }; 12 | 84D42C1620C7B9E400ABFD79 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D42C1520C7B9E400ABFD79 /* ViewController.m */; }; 13 | 84D42C1920C7B9E400ABFD79 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84D42C1720C7B9E400ABFD79 /* Main.storyboard */; }; 14 | 84D42C1B20C7B9E500ABFD79 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84D42C1A20C7B9E500ABFD79 /* Assets.xcassets */; }; 15 | 84D42C1E20C7B9E500ABFD79 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84D42C1C20C7B9E500ABFD79 /* LaunchScreen.storyboard */; }; 16 | 84D42C2120C7B9E500ABFD79 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D42C2020C7B9E500ABFD79 /* main.m */; }; 17 | 84D42C2B20C7B9E500ABFD79 /* AlertViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D42C2A20C7B9E500ABFD79 /* AlertViewTests.m */; }; 18 | 84D42C3620C7B9E500ABFD79 /* AlertViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D42C3520C7B9E500ABFD79 /* AlertViewUITests.m */; }; 19 | 84D42C6C20C7BA3B00ABFD79 /* MLAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D42C6B20C7BA3B00ABFD79 /* MLAlertView.m */; }; 20 | 84D42C7220C7D0F300ABFD79 /* UIView+MLExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D42C7020C7D0F300ABFD79 /* UIView+MLExtension.m */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 84D42C2720C7B9E500ABFD79 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 84D42C0620C7B9E400ABFD79 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 84D42C0D20C7B9E400ABFD79; 29 | remoteInfo = AlertView; 30 | }; 31 | 84D42C3220C7B9E500ABFD79 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 84D42C0620C7B9E400ABFD79 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 84D42C0D20C7B9E400ABFD79; 36 | remoteInfo = AlertView; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 84A4E33720CA5D03005A6DE2 /* NSString+AttributedString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+AttributedString.h"; sourceTree = ""; }; 42 | 84A4E33820CA5D03005A6DE2 /* NSString+AttributedString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+AttributedString.m"; sourceTree = ""; }; 43 | 84D42C0E20C7B9E400ABFD79 /* AlertView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AlertView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 84D42C1120C7B9E400ABFD79 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 45 | 84D42C1220C7B9E400ABFD79 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 46 | 84D42C1420C7B9E400ABFD79 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 47 | 84D42C1520C7B9E400ABFD79 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 48 | 84D42C1820C7B9E400ABFD79 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | 84D42C1A20C7B9E500ABFD79 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | 84D42C1D20C7B9E500ABFD79 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | 84D42C1F20C7B9E500ABFD79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 84D42C2020C7B9E500ABFD79 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 53 | 84D42C2620C7B9E500ABFD79 /* AlertViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AlertViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 84D42C2A20C7B9E500ABFD79 /* AlertViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AlertViewTests.m; sourceTree = ""; }; 55 | 84D42C2C20C7B9E500ABFD79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | 84D42C3120C7B9E500ABFD79 /* AlertViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AlertViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 84D42C3520C7B9E500ABFD79 /* AlertViewUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AlertViewUITests.m; sourceTree = ""; }; 58 | 84D42C3720C7B9E500ABFD79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | 84D42C6A20C7BA3B00ABFD79 /* MLAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MLAlertView.h; sourceTree = ""; }; 60 | 84D42C6B20C7BA3B00ABFD79 /* MLAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MLAlertView.m; sourceTree = ""; }; 61 | 84D42C7020C7D0F300ABFD79 /* UIView+MLExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MLExtension.m"; sourceTree = ""; }; 62 | 84D42C7120C7D0F300ABFD79 /* UIView+MLExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MLExtension.h"; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 84D42C0B20C7B9E400ABFD79 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | 84D42C2320C7B9E500ABFD79 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | 84D42C2E20C7B9E500ABFD79 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | 84A4E32320CA5098005A6DE2 /* MLAlertView */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 84D42C6A20C7BA3B00ABFD79 /* MLAlertView.h */, 94 | 84D42C6B20C7BA3B00ABFD79 /* MLAlertView.m */, 95 | 84D42C7120C7D0F300ABFD79 /* UIView+MLExtension.h */, 96 | 84D42C7020C7D0F300ABFD79 /* UIView+MLExtension.m */, 97 | 84A4E33720CA5D03005A6DE2 /* NSString+AttributedString.h */, 98 | 84A4E33820CA5D03005A6DE2 /* NSString+AttributedString.m */, 99 | ); 100 | path = MLAlertView; 101 | sourceTree = ""; 102 | }; 103 | 84D42C0520C7B9E400ABFD79 = { 104 | isa = PBXGroup; 105 | children = ( 106 | 84D42C1020C7B9E400ABFD79 /* AlertView */, 107 | 84D42C2920C7B9E500ABFD79 /* AlertViewTests */, 108 | 84D42C3420C7B9E500ABFD79 /* AlertViewUITests */, 109 | 84D42C0F20C7B9E400ABFD79 /* Products */, 110 | ); 111 | sourceTree = ""; 112 | }; 113 | 84D42C0F20C7B9E400ABFD79 /* Products */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 84D42C0E20C7B9E400ABFD79 /* AlertView.app */, 117 | 84D42C2620C7B9E500ABFD79 /* AlertViewTests.xctest */, 118 | 84D42C3120C7B9E500ABFD79 /* AlertViewUITests.xctest */, 119 | ); 120 | name = Products; 121 | sourceTree = ""; 122 | }; 123 | 84D42C1020C7B9E400ABFD79 /* AlertView */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 84A4E32320CA5098005A6DE2 /* MLAlertView */, 127 | 84D42C1120C7B9E400ABFD79 /* AppDelegate.h */, 128 | 84D42C1220C7B9E400ABFD79 /* AppDelegate.m */, 129 | 84D42C1420C7B9E400ABFD79 /* ViewController.h */, 130 | 84D42C1520C7B9E400ABFD79 /* ViewController.m */, 131 | 84D42C1720C7B9E400ABFD79 /* Main.storyboard */, 132 | 84D42C1A20C7B9E500ABFD79 /* Assets.xcassets */, 133 | 84D42C1C20C7B9E500ABFD79 /* LaunchScreen.storyboard */, 134 | 84D42C1F20C7B9E500ABFD79 /* Info.plist */, 135 | 84D42C2020C7B9E500ABFD79 /* main.m */, 136 | ); 137 | path = AlertView; 138 | sourceTree = ""; 139 | }; 140 | 84D42C2920C7B9E500ABFD79 /* AlertViewTests */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 84D42C2A20C7B9E500ABFD79 /* AlertViewTests.m */, 144 | 84D42C2C20C7B9E500ABFD79 /* Info.plist */, 145 | ); 146 | path = AlertViewTests; 147 | sourceTree = ""; 148 | }; 149 | 84D42C3420C7B9E500ABFD79 /* AlertViewUITests */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | 84D42C3520C7B9E500ABFD79 /* AlertViewUITests.m */, 153 | 84D42C3720C7B9E500ABFD79 /* Info.plist */, 154 | ); 155 | path = AlertViewUITests; 156 | sourceTree = ""; 157 | }; 158 | /* End PBXGroup section */ 159 | 160 | /* Begin PBXNativeTarget section */ 161 | 84D42C0D20C7B9E400ABFD79 /* AlertView */ = { 162 | isa = PBXNativeTarget; 163 | buildConfigurationList = 84D42C3A20C7B9E500ABFD79 /* Build configuration list for PBXNativeTarget "AlertView" */; 164 | buildPhases = ( 165 | 84D42C0A20C7B9E400ABFD79 /* Sources */, 166 | 84D42C0B20C7B9E400ABFD79 /* Frameworks */, 167 | 84D42C0C20C7B9E400ABFD79 /* Resources */, 168 | ); 169 | buildRules = ( 170 | ); 171 | dependencies = ( 172 | ); 173 | name = AlertView; 174 | productName = AlertView; 175 | productReference = 84D42C0E20C7B9E400ABFD79 /* AlertView.app */; 176 | productType = "com.apple.product-type.application"; 177 | }; 178 | 84D42C2520C7B9E500ABFD79 /* AlertViewTests */ = { 179 | isa = PBXNativeTarget; 180 | buildConfigurationList = 84D42C3D20C7B9E500ABFD79 /* Build configuration list for PBXNativeTarget "AlertViewTests" */; 181 | buildPhases = ( 182 | 84D42C2220C7B9E500ABFD79 /* Sources */, 183 | 84D42C2320C7B9E500ABFD79 /* Frameworks */, 184 | 84D42C2420C7B9E500ABFD79 /* Resources */, 185 | ); 186 | buildRules = ( 187 | ); 188 | dependencies = ( 189 | 84D42C2820C7B9E500ABFD79 /* PBXTargetDependency */, 190 | ); 191 | name = AlertViewTests; 192 | productName = AlertViewTests; 193 | productReference = 84D42C2620C7B9E500ABFD79 /* AlertViewTests.xctest */; 194 | productType = "com.apple.product-type.bundle.unit-test"; 195 | }; 196 | 84D42C3020C7B9E500ABFD79 /* AlertViewUITests */ = { 197 | isa = PBXNativeTarget; 198 | buildConfigurationList = 84D42C4020C7B9E500ABFD79 /* Build configuration list for PBXNativeTarget "AlertViewUITests" */; 199 | buildPhases = ( 200 | 84D42C2D20C7B9E500ABFD79 /* Sources */, 201 | 84D42C2E20C7B9E500ABFD79 /* Frameworks */, 202 | 84D42C2F20C7B9E500ABFD79 /* Resources */, 203 | ); 204 | buildRules = ( 205 | ); 206 | dependencies = ( 207 | 84D42C3320C7B9E500ABFD79 /* PBXTargetDependency */, 208 | ); 209 | name = AlertViewUITests; 210 | productName = AlertViewUITests; 211 | productReference = 84D42C3120C7B9E500ABFD79 /* AlertViewUITests.xctest */; 212 | productType = "com.apple.product-type.bundle.ui-testing"; 213 | }; 214 | /* End PBXNativeTarget section */ 215 | 216 | /* Begin PBXProject section */ 217 | 84D42C0620C7B9E400ABFD79 /* Project object */ = { 218 | isa = PBXProject; 219 | attributes = { 220 | LastUpgradeCheck = 0930; 221 | ORGANIZATIONNAME = mlb; 222 | TargetAttributes = { 223 | 84D42C0D20C7B9E400ABFD79 = { 224 | CreatedOnToolsVersion = 9.3.1; 225 | }; 226 | 84D42C2520C7B9E500ABFD79 = { 227 | CreatedOnToolsVersion = 9.3.1; 228 | TestTargetID = 84D42C0D20C7B9E400ABFD79; 229 | }; 230 | 84D42C3020C7B9E500ABFD79 = { 231 | CreatedOnToolsVersion = 9.3.1; 232 | TestTargetID = 84D42C0D20C7B9E400ABFD79; 233 | }; 234 | }; 235 | }; 236 | buildConfigurationList = 84D42C0920C7B9E400ABFD79 /* Build configuration list for PBXProject "AlertView" */; 237 | compatibilityVersion = "Xcode 9.3"; 238 | developmentRegion = en; 239 | hasScannedForEncodings = 0; 240 | knownRegions = ( 241 | en, 242 | Base, 243 | ); 244 | mainGroup = 84D42C0520C7B9E400ABFD79; 245 | productRefGroup = 84D42C0F20C7B9E400ABFD79 /* Products */; 246 | projectDirPath = ""; 247 | projectRoot = ""; 248 | targets = ( 249 | 84D42C0D20C7B9E400ABFD79 /* AlertView */, 250 | 84D42C2520C7B9E500ABFD79 /* AlertViewTests */, 251 | 84D42C3020C7B9E500ABFD79 /* AlertViewUITests */, 252 | ); 253 | }; 254 | /* End PBXProject section */ 255 | 256 | /* Begin PBXResourcesBuildPhase section */ 257 | 84D42C0C20C7B9E400ABFD79 /* Resources */ = { 258 | isa = PBXResourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | 84D42C1E20C7B9E500ABFD79 /* LaunchScreen.storyboard in Resources */, 262 | 84D42C1B20C7B9E500ABFD79 /* Assets.xcassets in Resources */, 263 | 84D42C1920C7B9E400ABFD79 /* Main.storyboard in Resources */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | 84D42C2420C7B9E500ABFD79 /* Resources */ = { 268 | isa = PBXResourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | 84D42C2F20C7B9E500ABFD79 /* Resources */ = { 275 | isa = PBXResourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | /* End PBXResourcesBuildPhase section */ 282 | 283 | /* Begin PBXSourcesBuildPhase section */ 284 | 84D42C0A20C7B9E400ABFD79 /* Sources */ = { 285 | isa = PBXSourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | 84D42C1620C7B9E400ABFD79 /* ViewController.m in Sources */, 289 | 84D42C6C20C7BA3B00ABFD79 /* MLAlertView.m in Sources */, 290 | 84D42C7220C7D0F300ABFD79 /* UIView+MLExtension.m in Sources */, 291 | 84D42C2120C7B9E500ABFD79 /* main.m in Sources */, 292 | 84A4E33920CA5D03005A6DE2 /* NSString+AttributedString.m in Sources */, 293 | 84D42C1320C7B9E400ABFD79 /* AppDelegate.m in Sources */, 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | }; 297 | 84D42C2220C7B9E500ABFD79 /* Sources */ = { 298 | isa = PBXSourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | 84D42C2B20C7B9E500ABFD79 /* AlertViewTests.m in Sources */, 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | }; 305 | 84D42C2D20C7B9E500ABFD79 /* Sources */ = { 306 | isa = PBXSourcesBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | 84D42C3620C7B9E500ABFD79 /* AlertViewUITests.m in Sources */, 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | }; 313 | /* End PBXSourcesBuildPhase section */ 314 | 315 | /* Begin PBXTargetDependency section */ 316 | 84D42C2820C7B9E500ABFD79 /* PBXTargetDependency */ = { 317 | isa = PBXTargetDependency; 318 | target = 84D42C0D20C7B9E400ABFD79 /* AlertView */; 319 | targetProxy = 84D42C2720C7B9E500ABFD79 /* PBXContainerItemProxy */; 320 | }; 321 | 84D42C3320C7B9E500ABFD79 /* PBXTargetDependency */ = { 322 | isa = PBXTargetDependency; 323 | target = 84D42C0D20C7B9E400ABFD79 /* AlertView */; 324 | targetProxy = 84D42C3220C7B9E500ABFD79 /* PBXContainerItemProxy */; 325 | }; 326 | /* End PBXTargetDependency section */ 327 | 328 | /* Begin PBXVariantGroup section */ 329 | 84D42C1720C7B9E400ABFD79 /* Main.storyboard */ = { 330 | isa = PBXVariantGroup; 331 | children = ( 332 | 84D42C1820C7B9E400ABFD79 /* Base */, 333 | ); 334 | name = Main.storyboard; 335 | sourceTree = ""; 336 | }; 337 | 84D42C1C20C7B9E500ABFD79 /* LaunchScreen.storyboard */ = { 338 | isa = PBXVariantGroup; 339 | children = ( 340 | 84D42C1D20C7B9E500ABFD79 /* Base */, 341 | ); 342 | name = LaunchScreen.storyboard; 343 | sourceTree = ""; 344 | }; 345 | /* End PBXVariantGroup section */ 346 | 347 | /* Begin XCBuildConfiguration section */ 348 | 84D42C3820C7B9E500ABFD79 /* Debug */ = { 349 | isa = XCBuildConfiguration; 350 | buildSettings = { 351 | ALWAYS_SEARCH_USER_PATHS = NO; 352 | CLANG_ANALYZER_NONNULL = YES; 353 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 354 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 355 | CLANG_CXX_LIBRARY = "libc++"; 356 | CLANG_ENABLE_MODULES = YES; 357 | CLANG_ENABLE_OBJC_ARC = YES; 358 | CLANG_ENABLE_OBJC_WEAK = YES; 359 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 360 | CLANG_WARN_BOOL_CONVERSION = YES; 361 | CLANG_WARN_COMMA = YES; 362 | CLANG_WARN_CONSTANT_CONVERSION = YES; 363 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 364 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 365 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 366 | CLANG_WARN_EMPTY_BODY = YES; 367 | CLANG_WARN_ENUM_CONVERSION = YES; 368 | CLANG_WARN_INFINITE_RECURSION = YES; 369 | CLANG_WARN_INT_CONVERSION = YES; 370 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 371 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 372 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 373 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 374 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 375 | CLANG_WARN_STRICT_PROTOTYPES = YES; 376 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 377 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 378 | CLANG_WARN_UNREACHABLE_CODE = YES; 379 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 380 | CODE_SIGN_IDENTITY = "iPhone Developer"; 381 | COPY_PHASE_STRIP = NO; 382 | DEBUG_INFORMATION_FORMAT = dwarf; 383 | ENABLE_STRICT_OBJC_MSGSEND = YES; 384 | ENABLE_TESTABILITY = YES; 385 | GCC_C_LANGUAGE_STANDARD = gnu11; 386 | GCC_DYNAMIC_NO_PIC = NO; 387 | GCC_NO_COMMON_BLOCKS = YES; 388 | GCC_OPTIMIZATION_LEVEL = 0; 389 | GCC_PREPROCESSOR_DEFINITIONS = ( 390 | "DEBUG=1", 391 | "$(inherited)", 392 | ); 393 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 394 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 395 | GCC_WARN_UNDECLARED_SELECTOR = YES; 396 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 397 | GCC_WARN_UNUSED_FUNCTION = YES; 398 | GCC_WARN_UNUSED_VARIABLE = YES; 399 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 400 | MTL_ENABLE_DEBUG_INFO = YES; 401 | ONLY_ACTIVE_ARCH = YES; 402 | SDKROOT = iphoneos; 403 | }; 404 | name = Debug; 405 | }; 406 | 84D42C3920C7B9E500ABFD79 /* Release */ = { 407 | isa = XCBuildConfiguration; 408 | buildSettings = { 409 | ALWAYS_SEARCH_USER_PATHS = NO; 410 | CLANG_ANALYZER_NONNULL = YES; 411 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 412 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 413 | CLANG_CXX_LIBRARY = "libc++"; 414 | CLANG_ENABLE_MODULES = YES; 415 | CLANG_ENABLE_OBJC_ARC = YES; 416 | CLANG_ENABLE_OBJC_WEAK = YES; 417 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 418 | CLANG_WARN_BOOL_CONVERSION = YES; 419 | CLANG_WARN_COMMA = YES; 420 | CLANG_WARN_CONSTANT_CONVERSION = YES; 421 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 422 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 423 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 424 | CLANG_WARN_EMPTY_BODY = YES; 425 | CLANG_WARN_ENUM_CONVERSION = YES; 426 | CLANG_WARN_INFINITE_RECURSION = YES; 427 | CLANG_WARN_INT_CONVERSION = YES; 428 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 429 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 430 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 431 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 432 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 433 | CLANG_WARN_STRICT_PROTOTYPES = YES; 434 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 435 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 436 | CLANG_WARN_UNREACHABLE_CODE = YES; 437 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 438 | CODE_SIGN_IDENTITY = "iPhone Developer"; 439 | COPY_PHASE_STRIP = NO; 440 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 441 | ENABLE_NS_ASSERTIONS = NO; 442 | ENABLE_STRICT_OBJC_MSGSEND = YES; 443 | GCC_C_LANGUAGE_STANDARD = gnu11; 444 | GCC_NO_COMMON_BLOCKS = YES; 445 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 446 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 447 | GCC_WARN_UNDECLARED_SELECTOR = YES; 448 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 449 | GCC_WARN_UNUSED_FUNCTION = YES; 450 | GCC_WARN_UNUSED_VARIABLE = YES; 451 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 452 | MTL_ENABLE_DEBUG_INFO = NO; 453 | SDKROOT = iphoneos; 454 | VALIDATE_PRODUCT = YES; 455 | }; 456 | name = Release; 457 | }; 458 | 84D42C3B20C7B9E500ABFD79 /* Debug */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 462 | CODE_SIGN_STYLE = Automatic; 463 | DEVELOPMENT_TEAM = PGATULE7BP; 464 | INFOPLIST_FILE = AlertView/Info.plist; 465 | LD_RUNPATH_SEARCH_PATHS = ( 466 | "$(inherited)", 467 | "@executable_path/Frameworks", 468 | ); 469 | PRODUCT_BUNDLE_IDENTIFIER = mlb.com.AlertView; 470 | PRODUCT_NAME = "$(TARGET_NAME)"; 471 | TARGETED_DEVICE_FAMILY = "1,2"; 472 | }; 473 | name = Debug; 474 | }; 475 | 84D42C3C20C7B9E500ABFD79 /* Release */ = { 476 | isa = XCBuildConfiguration; 477 | buildSettings = { 478 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 479 | CODE_SIGN_STYLE = Automatic; 480 | DEVELOPMENT_TEAM = PGATULE7BP; 481 | INFOPLIST_FILE = AlertView/Info.plist; 482 | LD_RUNPATH_SEARCH_PATHS = ( 483 | "$(inherited)", 484 | "@executable_path/Frameworks", 485 | ); 486 | PRODUCT_BUNDLE_IDENTIFIER = mlb.com.AlertView; 487 | PRODUCT_NAME = "$(TARGET_NAME)"; 488 | TARGETED_DEVICE_FAMILY = "1,2"; 489 | }; 490 | name = Release; 491 | }; 492 | 84D42C3E20C7B9E500ABFD79 /* Debug */ = { 493 | isa = XCBuildConfiguration; 494 | buildSettings = { 495 | BUNDLE_LOADER = "$(TEST_HOST)"; 496 | CODE_SIGN_STYLE = Automatic; 497 | DEVELOPMENT_TEAM = PGATULE7BP; 498 | INFOPLIST_FILE = AlertViewTests/Info.plist; 499 | LD_RUNPATH_SEARCH_PATHS = ( 500 | "$(inherited)", 501 | "@executable_path/Frameworks", 502 | "@loader_path/Frameworks", 503 | ); 504 | PRODUCT_BUNDLE_IDENTIFIER = mlb.com.AlertViewTests; 505 | PRODUCT_NAME = "$(TARGET_NAME)"; 506 | TARGETED_DEVICE_FAMILY = "1,2"; 507 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AlertView.app/AlertView"; 508 | }; 509 | name = Debug; 510 | }; 511 | 84D42C3F20C7B9E500ABFD79 /* Release */ = { 512 | isa = XCBuildConfiguration; 513 | buildSettings = { 514 | BUNDLE_LOADER = "$(TEST_HOST)"; 515 | CODE_SIGN_STYLE = Automatic; 516 | DEVELOPMENT_TEAM = PGATULE7BP; 517 | INFOPLIST_FILE = AlertViewTests/Info.plist; 518 | LD_RUNPATH_SEARCH_PATHS = ( 519 | "$(inherited)", 520 | "@executable_path/Frameworks", 521 | "@loader_path/Frameworks", 522 | ); 523 | PRODUCT_BUNDLE_IDENTIFIER = mlb.com.AlertViewTests; 524 | PRODUCT_NAME = "$(TARGET_NAME)"; 525 | TARGETED_DEVICE_FAMILY = "1,2"; 526 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AlertView.app/AlertView"; 527 | }; 528 | name = Release; 529 | }; 530 | 84D42C4120C7B9E500ABFD79 /* Debug */ = { 531 | isa = XCBuildConfiguration; 532 | buildSettings = { 533 | CODE_SIGN_STYLE = Automatic; 534 | DEVELOPMENT_TEAM = PGATULE7BP; 535 | INFOPLIST_FILE = AlertViewUITests/Info.plist; 536 | LD_RUNPATH_SEARCH_PATHS = ( 537 | "$(inherited)", 538 | "@executable_path/Frameworks", 539 | "@loader_path/Frameworks", 540 | ); 541 | PRODUCT_BUNDLE_IDENTIFIER = mlb.com.AlertViewUITests; 542 | PRODUCT_NAME = "$(TARGET_NAME)"; 543 | TARGETED_DEVICE_FAMILY = "1,2"; 544 | TEST_TARGET_NAME = AlertView; 545 | }; 546 | name = Debug; 547 | }; 548 | 84D42C4220C7B9E500ABFD79 /* Release */ = { 549 | isa = XCBuildConfiguration; 550 | buildSettings = { 551 | CODE_SIGN_STYLE = Automatic; 552 | DEVELOPMENT_TEAM = PGATULE7BP; 553 | INFOPLIST_FILE = AlertViewUITests/Info.plist; 554 | LD_RUNPATH_SEARCH_PATHS = ( 555 | "$(inherited)", 556 | "@executable_path/Frameworks", 557 | "@loader_path/Frameworks", 558 | ); 559 | PRODUCT_BUNDLE_IDENTIFIER = mlb.com.AlertViewUITests; 560 | PRODUCT_NAME = "$(TARGET_NAME)"; 561 | TARGETED_DEVICE_FAMILY = "1,2"; 562 | TEST_TARGET_NAME = AlertView; 563 | }; 564 | name = Release; 565 | }; 566 | /* End XCBuildConfiguration section */ 567 | 568 | /* Begin XCConfigurationList section */ 569 | 84D42C0920C7B9E400ABFD79 /* Build configuration list for PBXProject "AlertView" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | 84D42C3820C7B9E500ABFD79 /* Debug */, 573 | 84D42C3920C7B9E500ABFD79 /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | 84D42C3A20C7B9E500ABFD79 /* Build configuration list for PBXNativeTarget "AlertView" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | 84D42C3B20C7B9E500ABFD79 /* Debug */, 582 | 84D42C3C20C7B9E500ABFD79 /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | 84D42C3D20C7B9E500ABFD79 /* Build configuration list for PBXNativeTarget "AlertViewTests" */ = { 588 | isa = XCConfigurationList; 589 | buildConfigurations = ( 590 | 84D42C3E20C7B9E500ABFD79 /* Debug */, 591 | 84D42C3F20C7B9E500ABFD79 /* Release */, 592 | ); 593 | defaultConfigurationIsVisible = 0; 594 | defaultConfigurationName = Release; 595 | }; 596 | 84D42C4020C7B9E500ABFD79 /* Build configuration list for PBXNativeTarget "AlertViewUITests" */ = { 597 | isa = XCConfigurationList; 598 | buildConfigurations = ( 599 | 84D42C4120C7B9E500ABFD79 /* Debug */, 600 | 84D42C4220C7B9E500ABFD79 /* Release */, 601 | ); 602 | defaultConfigurationIsVisible = 0; 603 | defaultConfigurationName = Release; 604 | }; 605 | /* End XCConfigurationList section */ 606 | }; 607 | rootObject = 84D42C0620C7B9E400ABFD79 /* Project object */; 608 | } 609 | --------------------------------------------------------------------------------