Q:

Swift Tableview

I have an array[13, 30, 15]. I want to show them in a tableview, just want to give different numbers with different string title showing in the tableview. Like:
Apple: 13
Banana: 30
Pear: 15

Are there any simple ways to realize it? Any help appreciated.

A:

Just create one Dictionary like this [Int : String] and use this inside your cellForRowAtIndexPath.
var dict = [13 :"Apple", 30 : "Banana", 15 : "Pear"]

Now in cellForRowAtIndexPath
cell.label.text = dict[yourIntArray[indexPath.row]] 

Edit:
As you mention in comment your have only 3 value and its order never change then make one string array in order that you want and use that array in cellForRowAtIndexPath
var stringArr = ["Apple","Banana","Pear"]

Now in cellForRowAtIndexPath
cell.label.text = stringArr[indexPath.row]

