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
使其像典型的IOSAlertView
-(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
子类化。