2015-01-28 2 views
1

내가 잘못 했습니까? iOS 8.1 시뮬레이터와 iOS 8.1이 적용된 iPod Tocuh 5G에서 테스트했습니다. 그것은 가치가 무엇인지 내가 탐색 컨트롤러에서보기를 포함하지 않는 한, 내가 표시 할 UIAlertControllers를 가져올 수 없습니다를 들어Swift - UIAlertController 아무 것도 나타나지 않습니다.

var alert = UIAlertController(title: "Also save this picture?", message: "Adding this picture to your Camera Roll might be a good idea.", preferredStyle: UIAlertControllerStyle.Alert) 
      alert.addAction(UIAlertAction(title: "Yes", style: UIAlertActionStyle.Default, handler: { (action: UIAlertAction!) in 
        UIImageWriteToSavedPhotosAlbum(takenImage, nil, nil, nil) 
       })) 
      alert.addAction(UIAlertAction(title: "No", style: UIAlertActionStyle.Cancel, handler: nil)) 
      self.presentViewController(alert, animated: true, completion: nil) 
+0

콘솔에 무엇이 있습니까? –

+0

프로젝트에 탐색 컨트롤러를 추가 했습니까? – Sulabh

+0

예제 프로젝트에 코드를 추가하고 경고가 표시되는 storyboard의 탐색 컨트롤러에 viewcontroller를 포함합니다. – Sulabh

답변

1

("단일보기"너무 엑스 코드 (6)의 기본을 사용하여 템플릿은 다음과 같이 당신을 위해 그것을 설정할 수 있습니다) .

관련 문제