アラートアクションからタイトルセクションを削除します。アラートアクションをタイトルなしで作成する方法
をどのように私はすべて一緒にタイトルセクションを削除することができます。 作るタイトル文字列""
はタイトルセクション
@IBAction func addImage(sender: AnyObject!) {
let alert:UIAlertController = UIAlertController(title: "" ,message: nil, preferredStyle: UIAlertControllerStyle.ActionSheet)
let cameraAction = UIAlertAction(title: "Take Photo", style: UIAlertActionStyle.Default)
{
UIAlertAction in
self.openCamera()
}
let gallaryAction = UIAlertAction(title: "Choose Photo", style: UIAlertActionStyle.Default)
{
UIAlertAction in
self.openGallary()
}
let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel)
{
UIAlertAction in
}
// Add the actions
alert.addAction(cameraAction)
alert.addAction(gallaryAction)
alert.addAction(cancelAction)
// Present the controller
self.presentViewController(alert, animated: true, completion: nil)
}
は削除されませんこれは私が取得しています何ですか?
空の文字列の代わりに 'nil'を渡してみましたか?それはオプションの値 – bobDevil
ああ..働いています。回答として投稿したい場合は、私はそれを受け入れます。 –