带有一个UITextView的AlertView

来源:互联网 发布:linux中dump命令 编辑:程序博客网 时间:2024/05/02 03:47

在iOS7以后苹果公司就不允许在UIAlertView上添加子控件了,而UIAlertController是在iOS8以后才能用。

所以要实现alertView的输入框可输入多行的效果就只能自定制alertView了。


下载地址:http://pan.baidu.com/s/1dDeX9dR


// 在需要的.m文件中导入头文件

#import "TextViewAlertView.h"


// 创建TextViewAlertView的对象

TextViewAlertView *textViewAlertView = [[TextViewAlertViewalloc]initWithTitle:@"签名"message:nil];

textViewAlertView.delegate = self;

[textViewAlertView showInView:self.view];


// 实现确认按钮的代理

#pragma mark - TextViewAlertViewDelegate

- (void)textViewAlertViewSureBtnClick:(id)alertView

{

    

}




0 0
原创粉丝点击