显示UIImagePicker后启用UIButton

时间:2014-04-14 22:51:59

标签: ios objective-c uibutton uiimagepickercontroller

我已经尝试了一切,或者至少我认为我已经尝试过了。

我正在使用快门UIImagePicker禁用自定义UIButton

UIButton仅在我的视图控制器收到通知告知相机已准备就绪时启用。

正在调用此方法;但是,当我设置UIButton以使任何事情都没有发生时。按钮在那里因为我可以触摸它但我看不到它。

这是一段代码:

- (void)viewDidLoad
{
  ...
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cameraIsReady:) name:AVCaptureSessionDidStartRunningNotification object:nil];
}

- (void)cameraIsReady:(NSNotificationCenter *)notigivation{
    NSLog(@"Camera is ready");
    [self.shutterButton setEnable:YES];
    [self.shutterButton setNeedsDisplay]; //I tried with and without this method.
}

0 个答案:

没有答案
相关问题