Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/104.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c iOS:UIAlertView和多行UITextView_Objective C_Ios_Uiviewcontroller_Uitextview_Uialertview - Fatal编程技术网

Objective c iOS:UIAlertView和多行UITextView

Objective c iOS:UIAlertView和多行UITextView,objective-c,ios,uiviewcontroller,uitextview,uialertview,Objective C,Ios,Uiviewcontroller,Uitextview,Uialertview,我正在寻找一种将多行UITextView添加到UIAlertView的方法。我在谷歌上搜索了很多,但找不到有效的解决方案 我用的是iOS5 或者,这仅在UIAlertView的子类中才可能实现 编辑:我需要多行输入。编辑UIAlertViews被apple标记为不良做法。因此,最好创建自己的自定义UIViewController,它看起来像一个警报视图 使其能够加载新的视图控制器,而不是调用警报的函数 这是一个很好的动画示例,用于UIViewController使其像典型的IOSAlertVie

我正在寻找一种将多行
UITextView
添加到
UIAlertView
的方法。我在谷歌上搜索了很多,但找不到有效的解决方案

我用的是iOS5

或者,这仅在
UIAlertView
的子类中才可能实现


编辑:我需要多行输入。

编辑
UIAlertViews
被apple标记为不良做法。因此,最好创建自己的自定义
UIViewController
,它看起来像一个警报视图

使其能够加载新的视图控制器,而不是调用警报的函数

这是一个很好的动画示例,用于
UIViewController
使其像典型的IOS
AlertView

  -(void)initialDelayEnded {
self.view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.001, 0.001);
self.view.alpha = 1.0;
[UIView animateWithDuration:kTransitionDuration/1.5 animations:^{
    self.view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);
}completion:^(BOOL complete){
    [UIView animateWithDuration:kTransitionDuration/2 animations:^{
        self.view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.9, 0.9);
    }completion:^(BOOL complete){
        [UIView animateWithDuration:kTransitionDuration/2 animations:^{
            self.view.transform = CGAffineTransformIdentity;
        }];
    }];
}];

}

根据
UIAlertView
官方文档,您不应将
UIAlertView
子类化。