I have created an alert view and I want to align the text of the alert view to left and use this code.
But the problem is that (alert.subviews).count
is 0.
Here is my code:
let alert = UIAlertView(title: "Details:", message: "Composer: abcdfg \nShow:sdfa\nPerformer:asdasdf\nLanguage:farsi\nFirst Line:asdfasdfagadf", delegate: nil, cancelButtonTitle: "OK")
for view in alert.subviews{
if view.isKindOfClass(UILabel){
(view as UILabel).textAlignment = NSTextAlignment.Left
}
}
println((alert.subviews).count)
alert.show()
I want to align the message to left but the subviews count for alert is 0