<acronym id="s8ci2"><small id="s8ci2"></small></acronym>
<rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
<acronym id="s8ci2"></acronym>
<acronym id="s8ci2"><center id="s8ci2"></center></acronym>

電子發燒友App

硬聲App

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示
電子發燒友網>電子資料下載>電子資料>BAAlert iOS alert和actionSheet的封裝

BAAlert iOS alert和actionSheet的封裝

2022-06-24 | zip | 3.87 MB | 次下載 | 免費

資料介紹

授權協議 MIT
開發語言 Objective-C
軟件類型 開源軟件

軟件簡介

# BAAlert
[![BAHome Team Name](https://img.shields.io/badge/Team-BAHome-brightgreen.svg?style=flat)](https://github.com/BAHome "BAHome Team")
![](https://img.shields.io/badge/platform-iOS-red.svg) ![](https://img.shields.io/badge/language-Objective--C-orange.svg)?
![](https://img.shields.io/badge/license-MIT%20License-brightgreen.svg)?
![](https://img.shields.io/cocoapods/v/BAAlert.svg?style=flat) ![](https://img.shields.io/cocoapods/dt/BAAlert.svg
) ?[![](https://img.shields.io/badge/微博-博愛1616-red.svg)](http://weibo.com/538298123)

## 1、功能及簡介
* 1、手勢觸摸隱藏開關,可隨時開關

* 2、可以自定義背景圖片、背景顏色、按鈕顏色
* 3、可以添加文字和圖片,且可以滑動查看!
* 4、橫豎屏適配完美,注意:自定義 alert 不支持橫屏
* 5、有各種炫酷動畫展示你的 alert
* 6、可以自定義每個按鈕顏色

## 2、圖片示例
![BAAlert1.gif](https://github.com/BAHome/BAAlert/blob/master/Images/BAAlert1.gif)
![BAAlert2.gif](https://github.com/BAHome/BAAlert/blob/master/Images/BAAlert2.gif)

## 3、安裝、導入示例和源碼地址
* 1、pod 導入【最新版本:![](https://img.shields.io/cocoapods/v/BAAlert.svg?style=flat) ![](https://img.shields.io/cocoapods/dt/BAAlert.svg
)】:

?`pod 'BAAlert'` ` pod 'BAAlert-Swift'` ?

如果發現 `pod search BAAlert` 搜索出來的不是最新版本,需要在終端執行 cd 轉換文件路徑命令退回到 desktop,然后執行 `pod setup` 命令更新本地spec緩存(可能需要幾分鐘),然后再搜索就可以了。

具體步驟:
? - pod setup : 初始化
? - pod repo update : 更新倉庫
? - pod search BAAlert
* 2、文件夾拖入:下載demo,把 BAAlert 文件夾拖入項目即可,

* 3、導入頭文件:

` ?#import "BAAlert_OC.h" `

* 4、項目源碼地址:

?OC 版 :[https://github.com/BAHome/BAAlert](https://github.com/BAHome/BAAlert)

?swift 版 :[https://github.com/BAHome/BAAlert-Swift](https://github.com/BAHome/BAAlert-Swift)

## 4、BAAlert 的類結構及 demo 示例
![BAAlert.png](https://github.com/BAHome/BAAlert/blob/master/Images/BAAlert.png)

### BAAlert_OC.h
```
#ifndef BAAlert_OC_h
#define BAAlert_OC_h

#import "BAAlert.h"
#import "BAActionSheet.h"
#import "BAKit_ConfigurationDefine.h"

/*!
?*********************************************************************************
?************************************ 更新說明 ************************************
?*********************************************************************************
?
?歡迎使用 BAHome 系列開源代碼 !
?如有更多需求,請前往:https://github.com/BAHome
?
?項目源碼地址:
?OC 版 :https://github.com/BAHome/BAAlert
?
?最新更新時間:2017-06-23 【倒敘】
?最新Version:【Version:1.2.2】
?更新內容:
?1.2.2.1、優化部分宏定義
?
?最新更新時間:2017-06-19 【倒敘】

?最新Version:【Version:1.2.0】

?更新內容:

?1.2.0.1、統一全局宏定義文件,優化代碼規范 ?

?
?最新更新時間:2017-05-20 【倒敘】

?最新Version:【Version:1.1.9】

?更新內容:

?1.1.9.1、修復動畫過度白屏問題 ?

?最新更新時間:2017-05-15 【倒敘】

?最新Version:【Version:1.1.8】

?更新內容:

?1.1.8.1、精簡代碼結構,刪除多余或者重復代碼 ?

?1.1.8.2、規范代碼屬性和方法命名,原有方法名和屬性名有較大改動,忘見諒 ?

?1.1.8.3、重構 actionSheet,新增多種樣式 ?

?
?最新更新時間:2017-05-13 【倒敘】

?最新Version:【Version:1.1.7】

?更新內容:

?1.1.7.1、精簡代碼結構,刪除多余或者重復代碼 ?

?1.1.7.2、規范代碼屬性和方法命名,原有方法名和屬性名有較大改動,忘見諒 ?

?1.1.7.3、優化部分動畫 ?

?1.1.7.4、subView 布局優化 ?

?1.1.7.5、actionSheet 新增自定義文字顏色、title 字體顏色 ?

?
?最新更新時間:2017-05-10 【倒敘】

?最新Version:【Version:1.1.5】

?更新內容:

?1.1.5.1、刪除原有封裝內部按鈕點擊事件中 ba_dismissAlertView 方法,此方法可在外部自由調用 ?

?
?最新更新時間:2017-05-09 【倒敘】

?最新Version:【Version:1.1.4】

?更新內容:

?1.1.4.1、pod 更新xib 文件

?
?最新更新時間:2017-05-08 【倒敘】
?最新Version:【Version:1.1.0】
?更新內容:
?1.1.0.1、優化方法名命名規范
?1.1.0.2、新增鍵盤內部處理
?1.1.0.3、用原生 autoLayout 重構,自定義 alert 的布局再也不是問題了
?1.1.0.4、優化代碼結構,修復內在隱藏內存泄漏
?1.1.0.5、新增 BAAlert_OC.h 文件,只需導入 BAAlert_OC.h 一個文件就可以使用 alert 和 actionSheet 了
?1.1.0.6、刪除了部分代碼和屬性,具體見源碼 和 demo
?
?*/

#endif /* BAAlert_OC_h */
```

### BAAlert.h
```
#import
#import "BAAlert_Config.h"

@class BAAlert;

typedef void(^BAAlert_ConfigBlock)(BAAlert *tempView);

@interface BAAlert : UIView

/*! 背景顏色 默認:半透明*/
@property (nonatomic, strong) UIColor *bgColor;

/*! 是否開啟邊緣觸摸隱藏 alert 默認:NO */
@property (nonatomic, assign) BOOL isTouchEdgeHide;

/*! 背景圖片名字 默認:沒有圖片*/
@property (nonatomic, strong) NSString *bgImageName;

/*! 是否開啟進出場動畫 默認:NO,如果 YES ,并且同步設置進出場動畫枚舉為默認值:1 */
@property (nonatomic, assign, getter=isShowAnimate) BOOL showAnimate;

/*! 進出場動畫枚舉 默認:1 ,并且默認開啟動畫開關 */
@property (nonatomic, assign) BAAlertAnimatingStyle animatingStyle;

/*! 背景高斯模糊枚舉 默認:沒有模糊效果 */
@property (nonatomic, assign) BAAlertBlurEffectStyle blurEffectStyle;

/*!
?* ?創建一個完全自定義的 alertView,注意:【自定義 alert 只適用于豎屏狀態!】
?*
?* ?@param customView ? ?自定義 View
?* ?@param configuration 屬性配置:如 bgColor、buttonTitleColor、isTouchEdgeHide...
?*/
+ (void)ba_alertShowCustomView:(UIView *)customView
? ? ? ? ? ? ? ? ?configuration:(BAAlert_ConfigBlock) configuration;

/*!
?* ?創建一個類似于系統的alert
?*
?* ?@param title ? ? ? ? 標題:可空
?* ?@param message ? ? ? 消息內容:可空
?* ?@param image ? ? ? ? 圖片:可空
?* ?@param buttonTitleArray ?按鈕標題:不可空
?* ?@param buttonTitleColorArray ?按鈕標題顏色:可空,默認藍色
?* ?@param configuration 屬性配置:如 bgColor、buttonTitleColor、isTouchEdgeHide...
?* ?@param actionBlock ? ? ? ?按鈕的點擊事件處理
?*/
+ (void)ba_alertShowWithTitle:(NSString *)title
? ? ? ? ? ? ? ? ? ? ? message:(NSString *)message
? ? ? ? ? ? ? ? ? ? ? ? image:(UIImage *)image
? ? ? ? ? ? ?buttonTitleArray:(NSArray *)buttonTitleArray
? ? ? ? buttonTitleColorArray:(NSArray *)buttonTitleColorArray
? ? ? ? ? ? ? ? configuration:(BAAlert_ConfigBlock)configuration
? ? ? ? ? ? ? ? ? actionBlock:(BAAlert_ButtonActionBlock)actionBlock;

/*!
?* ?視圖消失
?*/
- (void)ba_alertHidden;

@end
```

### BAActionSheet.h
```
#import
#import "BAAlert_Config.h"

@class BAActionSheet, BAActionSheetModel;

typedef void(^BAActionSheet_ConfigBlock)(BAActionSheet *tempView);
typedef void (^BAActionSheet_ActionBlock)(NSIndexPath *indexPath, BAActionSheetModel *model);


@interface BAActionSheet : UIView

/*! 是否開啟邊緣觸摸隱藏 alert 默認:YES */
@property (nonatomic, assign) BOOL isTouchEdgeHide;

/*! 是否開啟進出場動畫 默認:NO,如果 YES ,并且同步設置進出場動畫枚舉為默認值:1 */
@property (nonatomic, assign, getter=isShowAnimate) BOOL showAnimate;

/*! 進出場動畫枚舉 默認:1 ,并且默認開啟動畫開關 */
@property (nonatomic, assign) BAAlertAnimatingStyle animatingStyle;

/*! BAActionSheet 類型,默認:1 */
@property (nonatomic, assign) BAActionSheetType actionSheetType;

@property (nonatomic, strong) NSArray *dataArray;
@property (nonatomic, strong) NSString *title;

/*!
?*
?* ?@param configuration 屬性配置:如 bgColor、buttonTitleColor、isTouchEdgeHide...
?* ?@param actionBlock ? block回調點擊的選項
?*/
+ (void)ba_actionSheetShowWithConfiguration:(BAActionSheet_ConfigBlock)configuration
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? actionBlock:(BAActionSheet_ActionBlock)actionBlock;

/*!
?* ?隱藏 BAActionSheet
?*/
- (void)ba_actionSheetHidden;

@end

@class BAActionSheetSubContentModel;
@interface BAActionSheetModel : NSObject

@property(nonatomic, copy) NSString *imageUrl;
@property(nonatomic, copy) NSString *content;
@property(nonatomic, copy) NSString *subContent;
@property(nonatomic, strong) NSArray *subContentArray;

@end

@interface BAActionSheetSubContentModel : NSObject

@property(nonatomic, copy) NSString *subContent;

@end
```
### demo 示例
```
- (void)actionSheet1
{
? ? NSMutableArray *dataArray = [NSMutableArray array];
? ? NSArray *contentArray = @[@"微信支付", @"支付寶", @"預付款賬戶"];
? ? NSArray *subContentArray = @[@"", @"18588888888", @"余額:¥480.00"];
? ? NSArray *imageArray = @[@"123.png", @"背景.jpg", @"美女.jpg"];
? ??
? ? for (NSInteger i = 0; i < contentArray.count; i++)
? ? {
? ? ? ? BAActionSheetModel *model = [BAActionSheetModel new];
? ? ? ? model.imageUrl = imageArray[i];
? ? ? ? model.content = contentArray[i];
? ? ? ? model.subContent = subContentArray[i];
? ? ? ??
? ? ? ? [dataArray addObject:model];
? ? }
? ? BAKit_WeakSelf
? ? [BAActionSheet ba_actionSheetShowWithConfiguration:^(BAActionSheet *tempView) {
? ? ? ??
? ? ? ? BAKit_StrongSelf
? ? ? ? tempView.title = @"支付方式";
? ? ? ? tempView.dataArray = dataArray;
? ? ? ? tempView.isTouchEdgeHide = NO;
? ? ? ? tempView.showAnimate = YES;
? ? ? ??
? ? ? ? self.actionSheet = tempView;
? ? } actionBlock:^(NSIndexPath *indexPath, BAActionSheetModel *model) {
? ? ? ? BAKit_ShowAlertWithMsg_ios8(model.content);
? ? }];
}

- (void)actionSheet2
{
? ? NSMutableArray *dataArray = [NSMutableArray array];
? ? NSArray *contentArray = @[@"微信支付", @"支付寶", @"預付款賬戶"];

? ? for (NSInteger i = 0; i < contentArray.count; i++)
? ? {
? ? ? ? BAActionSheetModel *model = [BAActionSheetModel new];
// ? ? ? ?model.imageUrl = imageArray[i];
? ? ? ? model.content = contentArray[i];
// ? ? ? ?model.subContent = subContentArray[i];
? ? ? ??
? ? ? ? [dataArray addObject:model];
? ? }
? ? BAKit_WeakSelf
? ? [BAActionSheet ba_actionSheetShowWithConfiguration:^(BAActionSheet *tempView) {
? ? ? ??
? ? ? ? BAKit_StrongSelf
// ? ? ? ?tempView.title = @"支付方式";
? ? ? ? tempView.dataArray = dataArray;
? ? ? ? tempView.actionSheetType = BAActionSheetTypeCustom;
? ? ? ? // ? ? ? ?tempView.isTouchEdgeHide = NO;
? ? ? ??
? ? ? ? self.actionSheet = tempView;
? ? } actionBlock:^(NSIndexPath *indexPath, BAActionSheetModel *model) {
? ? ? ? BAKit_ShowAlertWithMsg_ios8(model.content);
? ? }];
}

- (void)actionSheet3
{
? ? NSArray *contentArray = @[@"微信支付", @"支付寶", @"預付款賬戶", @"中行"];
? ? NSArray *subContentArray = @[
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? @[@"微信支付1", @"微信支付2", @"微信支付3"],
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? @[@"支付寶1", @"支付寶2", @"支付寶3", @"支付寶4"],
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? @[],
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? @[@"中行1", @"中行2", @"中行3", @"中行4", @"中行5", @"中行6", @"中行7", @"中行2", @"中行3", @"中行4", @"中行5", @"中行6", @"中行7", @"中行2", @"中行3", @"中行4", @"中行5", @"中行6", @"中行7", @"中行2", @"中行3", @"中行4", @"中行5", @"中行6", @"中行7"]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ];
? ??
? ? NSMutableArray *dataArray = @[].mutableCopy;
? ? for (NSInteger i = 0; i < contentArray.count; i++)
? ? {
? ? ? ? BAActionSheetModel *model = [BAActionSheetModel new];
? ? ? ? model.content = contentArray[i];
? ? ? ??
? ? ? ? NSMutableArray *mutArray = @[].mutableCopy;
? ? ? ? for (NSInteger j = 0; j < subContentArray[i].count; j ++)
? ? ? ? {
? ? ? ? ? ? BAActionSheetSubContentModel *subContentModel = [BAActionSheetSubContentModel new];
? ? ? ? ? ? subContentModel.subContent = subContentArray[i][j];
? ? ? ? ? ? [mutArray addObject:subContentModel];
? ? ? ? }
? ? ? ? model.subContentArray = mutArray;
? ? ? ??
? ? ? ? [dataArray addObject:model];
? ? }
? ??
? ? BAKit_WeakSelf
? ? [BAActionSheet ba_actionSheetShowWithConfiguration:^(BAActionSheet *tempView) {
? ? ? ??
? ? ? ? BAKit_StrongSelf
? ? ? ? tempView.title = @"支付方式";
? ? ? ? tempView.dataArray = dataArray;
? ? ? ? tempView.actionSheetType = BAActionSheetTypeExpand;
? ? ? ? // ? ? ? ?tempView.isTouchEdgeHide = NO;
? ? ? ??
? ? ? ? self.actionSheet = tempView;
? ? } actionBlock:^(NSIndexPath *indexPath, BAActionSheetModel *model) {
? ? ? ? if (model.subContentArray.count > 0)
? ? ? ? {
? ? ? ? ? ? BAKit_ShowAlertWithMsg_ios8(model.subContentArray[indexPath.row].subContent);
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? BAKit_ShowAlertWithMsg_ios8(model.content);
? ? ? ? }
? ? }];
}


- (void)alert1
{
? ? BAKit_WeakSelf
? ? /*! 第一種封裝使用示例 */
? ? [BAAlert ba_alertShowWithTitle:title0 message:titleMsg0 image:nil buttonTitleArray:@[@"取消",@"確定",@"確定2",@"確定3"] buttonTitleColorArray:@[[UIColor redColor], [UIColor greenColor], [UIColor grayColor], [UIColor purpleColor]] configuration:^(BAAlert *tempView) {
? ? ? ? BAKit_StrongSelf
? ? ? ? // ? ? ? ?temp.bgColor ? ? ? = [UIColor colorWithRed:0 green:1.0 blue:0 alpha:0.3];
? ? ? ? /*! 開啟邊緣觸摸隱藏alertView */
? ? ? ? tempView.isTouchEdgeHide = YES;
? ? ? ? /*! 添加高斯模糊的樣式 */
? ? ? ? tempView.blurEffectStyle = BAAlertBlurEffectStyleLight;
? ? ? ? /*! 開啟動畫 */
? ? ? ? ? ? ? ? tempView.showAnimate ? = YES;
? ? ? ? // ? ? ? ?/*! 進出場動畫樣式 默認為:1 */
? ? ? ? // ? ? ? ?tempView.animatingStyle ?= 1;
? ? ? ? self.alertView1 = tempView;
? ? } actionBlock:^(NSInteger index) {
? ? ? ? BAKit_StrongSelf
? ? ? ? [self.alertView1 ba_alertHidden];
? ? ? ? if (index == 1)
? ? ? ? {
? ? ? ? ? ? NSLog(@"點擊了確定按鈕!");
? ? ? ? ? ? ViewController2 *vc2 = [ViewController2 new];
? ? ? ? ? ? vc2.title = @"alert1";
? ? ? ? ? ? [self.navigationController pushViewController:vc2 animated:YES];
? ? ? ? }
? ? }];
}

- (void)alert2
{
// ? ?/*! 2、自定義按鈕顏色 */
? ? BAKit_WeakSelf
? ? [BAAlert ba_alertShowWithTitle:@"溫馨提示:" message:titleMsg2 image:nil buttonTitleArray:@[@"取消", @"跳轉VC2"] buttonTitleColorArray:@[[UIColor redColor], [UIColor greenColor]] configuration:^(BAAlert *tempView) {
? ? ? ? BAKit_StrongSelf
? ? ? ? /*! 自定義按鈕文字顏色 */
? ? ? ? // ? ?tempView.buttonTitleColor = [UIColor orangeColor];
? ? ? ? tempView.bgColor = [UIColor colorWithRed:1.0 green:1.0 blue:0 alpha:0.3];
? ? ? ? tempView.isTouchEdgeHide = YES;

? ? ? ? /*! 是否開啟進出場動畫 默認:NO,如果 YES ,并且同步設置進出場動畫枚舉為默認值:1 */
? ? ? ? tempView.showAnimate = YES;
? ? ? ? tempView.animatingStyle ?= BAAlertAnimatingStyleShake;

? ? ? ? self.alertView2 = tempView;

? ? } actionBlock:^(NSInteger index) {
? ? ? ? BAKit_StrongSelf
? ? ? ? [self.alertView2 ba_alertHidden];
? ? ? ? if (index == 0)
? ? ? ? {
? ? ? ? ? ? NSLog(@"點擊了取消按鈕!");
? ? ? ? }
? ? ? ? else if (index == 1)
? ? ? ? {
? ? ? ? ? ? NSLog(@"點擊了確定按鈕!");
? ? ? ? ? ? ViewController2 *vc2 = [ViewController2 new];
? ? ? ? ? ? vc2.title = @"alert2";
? ? ? ? ? ? [self.navigationController pushViewController:vc2 animated:YES];
? ? ? ? }
? ? }];
}

- (void)alert3
{
? ? /*! 3、自定義背景圖片 */
? ? BAKit_WeakSelf
? ? [BAAlert ba_alertShowWithTitle:@"溫馨提示:" message:titleMsg1 image:nil buttonTitleArray:@[@"取消", @"確定"] buttonTitleColorArray:@[[UIColor redColor], [UIColor greenColor]] configuration:^(BAAlert *tempView) {
? ? ? ? BAKit_StrongSelf
? ? ? ? /*! 自定義按鈕文字顏色 */
? ? ? ? // ? ?tempView.buttonTitleColor = [UIColor orangeColor];
? ? ? ? /*! 自定義alert的背景圖片 */
? ? ? ? tempView.bgImageName ? ? ?= @"背景.jpg";
? ? ? ? /*! 開啟動畫,并且設置動畫樣式,默認:1 */
// ? ? ? ?tempView.showAnimate = YES;
? ? ? ??
? ? ? ? /*! 沒有開啟動畫,直接進出場動畫樣式,默認開啟動畫 */
? ? ? ? tempView.animatingStyle ?= BAAlertAnimatingStyleFall;
? ? ? ??
? ? ? ? self.alertView3 = tempView;
? ? } actionBlock:^(NSInteger index) {
? ? ? ? BAKit_StrongSelf
? ? ? ? [self.alertView3 ba_alertHidden];
? ? ? ? if (index == 0)
? ? ? ? {
? ? ? ? ? ? NSLog(@"點擊了取消按鈕!");
? ? ? ? }
? ? ? ? else if (index == 1)
? ? ? ? {
? ? ? ? ? ? NSLog(@"點擊了確定按鈕!");
? ? ? ? ? ? ViewController2 *vc2 = [ViewController2 new];
? ? ? ? ? ? vc2.title = @"alert3";
? ? ? ? ? ? [self.navigationController pushViewController:vc2 animated:YES];
? ? ? ? }
? ? }];
}

- (void)alert4
{
? ? /*! 4、內置圖片和文字,可滑動查看 */
? ? BAKit_WeakSelf
? ? [BAAlert ba_alertShowWithTitle:@"溫馨提示:" message:titleMsg1 image:[UIImage imageNamed:@"美女.jpg"] buttonTitleArray:@[@"取消", @"跳轉VC2"] buttonTitleColorArray:@[[UIColor redColor], [UIColor greenColor]] configuration:^(BAAlert *tempView) {
? ? ? ? BAKit_StrongSelf
? ? ? ? /*! 自定義按鈕文字顏色 */
? ? ? ? // ? ?tempView.buttonTitleColor = [UIColor orangeColor];
? ? ? ? /*! 自定義alert的背景圖片 */
? ? ? ? tempView.bgImageName = @"背景.jpg";
? ? ? ? /*! 是否顯示動畫效果 */
? ? ? ? tempView.showAnimate = YES;
? ? ? ? self.alertView4 = tempView;
? ? } actionBlock:^(NSInteger index) {
? ? ? ? BAKit_StrongSelf
? ? ? ? [self.alertView4 ba_alertHidden];
? ? ? ? if (index == 0)
? ? ? ? {
? ? ? ? ? ? NSLog(@"點擊了取消按鈕!");
? ? ? ? }
? ? ? ? else if (index == 1)
? ? ? ? {
? ? ? ? ? ? NSLog(@"點擊了確定按鈕!");
? ? ? ? ? ? ViewController2 *vc2 = [ViewController2 new];
? ? ? ? ? ? vc2.title = @"alert4";
? ? ? ? ? ? [self.navigationController pushViewController:vc2 animated:YES];
? ? ? ? }
? ? }];
}

- (void)alert5
{
? ? /*! 5、完全自定義alert */
? ? _customView = [CustomView new];
? ? self.customView.frame = CGRectMake(50, SCREENHEIGHT - 300, SCREENWIDTH - 50 * 2, 162);

? ? BAKit_WeakSelf
? ? [BAAlert ba_alertShowCustomView:self.customView configuration:^(BAAlert *tempView) {
? ? ? ? BAKit_StrongSelf
? ? ? ? tempView.isTouchEdgeHide = YES;
? ? ? ? tempView.animatingStyle = BAAlertAnimatingStyleScale;
? ? ? ? self.alertView5 = tempView;
? ? }];
? ??
? ? self.customView.block = ^(NSInteger index) {
? ? ? ? BAKit_StrongSelf
? ? ? ? if (index == 1)
? ? ? ? {
? ? ? ? ? ? [self.alertView5 ba_alertHidden];
? ? ? ? }
? ? };
}

其他示例可下載demo查看源碼!
```

## 5、更新記錄:【倒敘】
?歡迎使用 [【BAHome】](https://github.com/BAHome) 系列開源代碼 !
?如有更多需求,請前往:[【https://github.com/BAHome】](https://github.com/BAHome)?
?
?最新更新時間:2017-06-23 【倒敘】
?最新Version:【Version:1.2.2】
?更新內容:
?1.2.2.1、優化部分宏定義
?
?最新更新時間:2017-05-20 【倒敘】

?最新Version:【Version:1.1.9】

?更新內容:

?1.1.9.1、修復動畫過度白屏問題 ?

?
?最新更新時間:2017-05-15 【倒敘】

?最新Version:【Version:1.1.8】

?更新內容:

?1.1.8.1、精簡代碼結構,刪除多余或者重復代碼 ?

?1.1.8.2、規范代碼屬性和方法命名,原有方法名和屬性名有較大改動,忘見諒 ?

?1.1.8.3、重構 actionSheet,新增多種樣式 ?

?
?最新更新時間:2017-05-13 【倒敘】

?最新Version:【Version:1.1.7】

?更新內容:

?1.1.7.1、精簡代碼結構,刪除多余或者重復代碼 ?

?1.1.7.2、規范代碼屬性和方法命名,原有方法名和屬性名有較大改動,忘見諒 ?

?1.1.7.3、優化部分動畫 ?

?1.1.7.4、subView 布局優化 ?

?1.1.7.5、actionSheet 新增自定義文字顏色、title 字體顏色 ?

?
?最新更新時間:2017-05-10 【倒敘】

?最新Version:【Version:1.1.5】

?更新內容:

?1.1.5.1、刪除原有封裝內部按鈕點擊事件中 ba_dismissAlertView 方法,此方法可在外部自由調用 ?

?
?最新更新時間:2017-05-09 【倒敘】

?最新Version:【Version:1.1.4】

?更新內容:

?1.1.4.1、pod 更新xib 文件

?
?最新更新時間:2017-05-08 【倒敘】
?最新Version:【Version:1.1.0】
?更新內容:
?1.1.0.1、優化方法名命名規范
?1.1.0.2、新增鍵盤內部處理
?1.1.0.3、用原生 autoLayout 重構,自定義 alert 的布局再也不是問題了
?1.1.0.4、優化代碼結構,修復內在隱藏內存泄漏
?1.1.0.5、新增 BAAlert_OC.h 文件,只需導入 BAAlert_OC.h 一個文件就可以使用 alert 和 actionSheet 了
?1.1.0.6、刪除了部分代碼和屬性,具體見源碼 和 demo

## 6、bug 反饋
> 1、開發中遇到 bug,希望小伙伴兒們能夠及時反饋與我們 BAHome 團隊,我們必定會認真對待每一個問題!

> 2、以后提需求和 bug 的同學,記得把 git 或者博客鏈接給我們,我直接超鏈到你們那里!希望大家積極參與測試!
?

## 7、BAHome 團隊成員
> 1、QQ 群?
479663605
?
【注意:此群為 2 元 付費群,介意的小伙伴兒勿擾!】
?

> 孫博巖
?
QQ:137361770
?
git:[https://github.com/boai](https://github.com/boai)

簡書:[http://www.jianshu.com/u/95c9800fdf47](http://www.jianshu.com/u/95c9800fdf47)

微博:[![](https://img.shields.io/badge/微博-博愛1616-red.svg)](http://weibo.com/538298123)

> 馬景麗
?
QQ:1253540493
?
git:[https://github.com/MaJingli](https://github.com/MaJingli)

> 陸曉峰
?
QQ:442171865
?
git:[https://github.com/zeR0Lu](https://github.com/zeR0Lu)

> 陳集
?
QQ:3161182978
?
git:[https://github.com/chenjipdc](https://github.com/chenjipdc)

簡書:[http://www.jianshu.com/u/90ae559fc21d](http://www.jianshu.com/u/90ae559fc21d)

> 任子豐
?
QQ:459643690
?
git:[https://github.com/renzifeng](https://github.com/renzifeng)

> 吳豐收
?
QQ:498121294
?

> 石少庸
?
QQ:363605775
?
git:[https://github.com/CrazyCoderShi](https://github.com/CrazyCoderShi)

簡書:[http://www.jianshu.com/u/0726f4d689a3](http://www.jianshu.com/u/0726f4d689a3)

## 8、開發環境 和 支持版本
> 開發使用 最新版本 Xcode,理論上支持 iOS 8 及以上版本,如有版本適配問題,請及時反饋!多謝合作!

## 9、感謝
> 感謝 BAHome 團隊成員傾力合作,后期會推出一系列 常用 UI 控件的封裝,大家有需求得也可以在 issue 提出,如果合理,我們會盡快推出新版本!

> BAHome 的發展離不開小伙伴兒的信任與推廣,再次感謝各位小伙伴兒的支持!

?

下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1山景DSP芯片AP8248A2數據手冊
  2. 1.06 MB  |  532次下載  |  免費
  3. 2RK3399完整板原理圖(支持平板,盒子VR)
  4. 3.28 MB  |  339次下載  |  免費
  5. 3TC358743XBG評估板參考手冊
  6. 1.36 MB  |  330次下載  |  免費
  7. 4DFM軟件使用教程
  8. 0.84 MB  |  295次下載  |  免費
  9. 5元宇宙深度解析—未來的未來-風口還是泡沫
  10. 6.40 MB  |  227次下載  |  免費
  11. 6迪文DGUS開發指南
  12. 31.67 MB  |  194次下載  |  免費
  13. 7元宇宙底層硬件系列報告
  14. 13.42 MB  |  182次下載  |  免費
  15. 8FP5207XR-G1中文應用手冊
  16. 1.09 MB  |  178次下載  |  免費

本月

  1. 1OrCAD10.5下載OrCAD10.5中文版軟件
  2. 0.00 MB  |  234315次下載  |  免費
  3. 2555集成電路應用800例(新編版)
  4. 0.00 MB  |  33566次下載  |  免費
  5. 3接口電路圖大全
  6. 未知  |  30323次下載  |  免費
  7. 4開關電源設計實例指南
  8. 未知  |  21549次下載  |  免費
  9. 5電氣工程師手冊免費下載(新編第二版pdf電子書)
  10. 0.00 MB  |  15349次下載  |  免費
  11. 6數字電路基礎pdf(下載)
  12. 未知  |  13750次下載  |  免費
  13. 7電子制作實例集錦 下載
  14. 未知  |  8113次下載  |  免費
  15. 8《LED驅動電路設計》 溫德爾著
  16. 0.00 MB  |  6656次下載  |  免費

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935054次下載  |  免費
  3. 2protel99se軟件下載(可英文版轉中文版)
  4. 78.1 MB  |  537798次下載  |  免費
  5. 3MATLAB 7.1 下載 (含軟件介紹)
  6. 未知  |  420027次下載  |  免費
  7. 4OrCAD10.5下載OrCAD10.5中文版軟件
  8. 0.00 MB  |  234315次下載  |  免費
  9. 5Altium DXP2002下載入口
  10. 未知  |  233046次下載  |  免費
  11. 6電路仿真軟件multisim 10.0免費下載
  12. 340992  |  191187次下載  |  免費
  13. 7十天學會AVR單片機與C語言視頻教程 下載
  14. 158M  |  183279次下載  |  免費
  15. 8proe5.0野火版下載(中文版免費下載)
  16. 未知  |  138040次下載  |  免費
亚洲欧美日韩精品久久_久久精品AⅤ无码中文_日本中文字幕有码在线播放_亚洲视频高清不卡在线观看
<acronym id="s8ci2"><small id="s8ci2"></small></acronym>
<rt id="s8ci2"></rt><rt id="s8ci2"><optgroup id="s8ci2"></optgroup></rt>
<acronym id="s8ci2"></acronym>
<acronym id="s8ci2"><center id="s8ci2"></center></acronym>