Posts

Showing posts with the label swift4

Reference to a TableView Delegate Object within a Scene in Swift 4

Reference to a TableView Delegate Object within a Scene in Swift 4 I have a tableview in a SpriteKit scene. Using a tableview delegate method, I like to pass to another scene/ViewController, which cell was selected. There is only a single storyboard as this is entirely a SpriteKit game. //TableView inside Scene & Delegate Protocol: protocol gameSelectedDelegate { func theGameSelected(gameInt: Int) } class GamesTableView: UITableView, UITableViewDelegate,UITableViewDataSource { //Test Data var items: [String] = ["Player1", "Player2"] let defaults = UserDefaults.standard var gamesList = [Game]() var passedGame: Int? //instance of delegate var selectionDelegate: gameSelectedDelegate!` //GameScene to receive tableview data and delegate for my tableview class GamePlay: SKScene, gameSelectedDelegate { var backButton = SKLabelNode(fontNamed: "ArialRoundedMTBold") var score = SKLabelNode(fontNamed: "ArialRoundedMTBold") var passedGame = 0 //Not gett...

How to get sleep data without healthkit in iOS 10

How to get sleep data without healthkit in iOS 10 I wants to get accurate sleep data into my iOS app without using health kit. Please provide suggestions. https://apple.news/As1Ja5ZpOSzOt--RV8NkIWQ Can you please be more specific on what you want to achieve here? because for some specific scenarios, there is no way beyond using iOS healthKit! – Karthick Ramesh Jul 2 at 5:17 @KarthickRamesh I want to display user sleep data in admin panel and i want it without health kit as it needs user permission. – Hemant Solanki Jul 2 at 5:58 1 Answer 1 No, for getting sleep data from iphone you need to use the health kit....