我编写了简单的代码来测试UIImagePickerController:
@implementation ProfileEditViewController
- (void)viewDidLoad {
[super viewDidLoad];
photoTaker_ = [[UIImagePickerController alloc] init];
photoTaker_.delegate = self;
photoTaker_.sourceType = UIImagePickerControllerSourceTypeCamera;
photoTaker_.showsCameraControls = NO;
}
- (void)viewDidAppear: (BOOL)animated {
[self presentModalViewController: photoTaker_ animated: NO];
}
@end
Run Code Online (Sandbox Code Playgroud)
我收到如下奇怪的警告:
2010-05-20 17:53:13.838 TestProj [2814:307]使用两阶段旋转动画.要使用更平滑的单阶段动画,此应用程序必须删除两阶段方法实现.2010-05-20 17:53:13.849 TestProj [2814:307]旋转多个视图控制器或视图控制器而不是窗口委托时,不支持使用两阶段旋转动画
知道这是关于什么的吗?非常感谢提前!
我在使用Core Anmiation动画我的自定义图层属性时遇到了困难.
我的问题是如何生成CALayer的表示.这就是我现在拥有的:
@interface MyLayer : CALayer {
NSMutableDictionary* customProperties;
}
@property (nonatomic, copy) NSMutableDictionary* customProperties;
@end
Run Code Online (Sandbox Code Playgroud)
当我尝试使用CABasicAnimation和addAnimation:forKey:设置关键路径"customProperties.roll"的动画时,似乎不会将customProperties变量从模型层复制到表示层,并且会出现表示层的customProperties为零,无法更新键"roll"的值.
有没有办法正确地为字典中的值设置动画?动画时模型层和表示层之间的确切关系是什么?
谢谢!
我正在尝试按下按钮时显示警报视图,因此我编写了如下代码:
- (IBAction)signUpComplete: (id)sender {
UIAlertView* alert_view = [[UIAlertView alloc]
initWithTitle: @"test" message: @"test" delegate: nil cancelButtonTitle: @"cancel" otherButtonTitles: @"OK"];
[alert_view show];
[alert_view release];
}
Run Code Online (Sandbox Code Playgroud)
但是这个代码在initWithTitle方法中遇到以下异常崩溃:
2010-08-11 03:03:18.697 Polaris [1155:207]*** - [UIButton copyWithZone:]:无法识别的选择器发送到实例0x176af0
2010-08-11 03:03:18.700 Polaris [1155:207]***由于未捕获的异常而终止应用程序
0x176af0与参数'sender'的值相同,后者是其动作处理程序为signUpComplete的按钮:我认为问题是otherButtonTitles:参数,因为它与参数nil一起工作正常.因此创建"确定"按钮时出现问题.我的代码有什么问题吗?
谢谢!