Git Product home page Git Product logo

recovery's Introduction

alt text


This is Physical Therapy App I built at a hackathon. Basic tutorial included but happy to add more if there are enough requested!

Live DEMO

alt text

These are the SDK's in the project.

Donate Donations will be put back in tutorials (but please don't feel like it's necessary).

Installation

Install the SDK's by opening terminal to root directory of your project.

pod install

Open the Xcode Workspace (not the project)

Recovery.xcworkspace

alt text

Swift

   func tableView(_ tableView:UITableView, numberOfRowsInSection section:Int) -> Int
    {
        
        return self.contentArray.count
    }

This function sets the number of cells in the Table View. It is typically set to the .count of the number of items in the array that holds the data for each cell.

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
    { return cell
    }
    

This function displays the data in each cell. You must have a separate class to contain the cell data, which in this project is TableViewCell.swift.

Lastly, we have the function that plays the video:

 private  func playVideo(video: String) {
        guard let path = Bundle.main.path(forResource: video, ofType:"m4v") else {
            debugPrint("video.m4v not found")
            return
        }
        let player = AVPlayer(url: URL(fileURLWithPath: path))
        let playerController = AVPlayerViewController()
        playerController.player = player
        present(playerController, animated: true) {
            player.play()
        }
    }

The videos in the array are then called with this function: playVideo(video: movArray[indexPath.row]), where movArray is the array holding all of the videos. Typically, you would get all of the video data from the server but this is simply an example app.

This is has been a brief tutorial on how to setup a table View in iOS Swift. Please feel free to ask questions on how the app is build and I will add tutorial points later if needed.

recovery's People

Contributors

bfmarks avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.