Closed sabrefm1-zz closed 7 years ago
That's because the sample app is just showing how to get the times from the framework. How you choose to display those times is completely up to you. Here is a good tutorial on using a tableview https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson7.html
would i need the code above and then implement it for tableview. sorry I am new to xcode so not sure where to start
@sabrefm1 yes, instead of printing the string to the console you would assign it as the text of a label.
myLabel.text = formatter.string(from: prayers.asr)
I am using the swift version of this app. It works without issues but the results are displated in the xcode output menu. see below link.
http://i191.photobucket.com/albums/z219/fawaazm/output_zps62vpc6cm.png
How do I set this up in xcode to display the output data prayer times in a tableview or textview or imageview.
this is my code below
import UIKit import Adhan
class ViewController: UIViewController, UIAlertViewDelegate {
// NSLog("Sunrise %@", formatter.string(from: prayers.sunrise)) print("Thur", formatter.string(from: prayers.dhuhr)) print("Asr", formatter.string(from: prayers.asr)) print("Maghrib", formatter.string(from: prayers.maghrib)) print("Eshaai", formatter.string(from: prayers.isha))
}
}