top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How to use UIAlertview in SWIFT

0 votes
294 views

How to declare , set message and show alert in SWIFT.

posted Aug 13, 2014 by Arun

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

You have to use UIAlertView as below

   var rowData: NSDictionary = self.tableData[indexPath.row] as NSDictionary
    var name: String = rowData["trackName"] as String
    var formattedPrice: String = rowData["formattedPrice"] as String

    var alert: UIAlertView = UIAlertView()
    alert.title = name
    alert.message = formattedPrice
    alert.addButtonWithTitle("Ok")
    alert.show()
answer Aug 13, 2014 by Raju
Similar Questions
+1 vote

How to use default values for parameter in function. What will happens when value is not passed for a default parameters.

0 votes

I want to know how to make cross bridging to use SWIFT in Objective C class

+2 votes

I am facing situation to use objective c class in SWIFT. So, i am looking for any instruction to achieve this

+1 vote

How to use below code in swift.

[actionBtn addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
0 votes

I am using below code

var i = 1
println(i) //result is 1   
println(%02i)

but its throwing error

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...