Skip to content

Instantly share code, notes, and snippets.

@Kmohamed
Created March 2, 2019 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kmohamed/2bf3021ed15a42b6a6ba241a71157dc8 to your computer and use it in GitHub Desktop.
Save Kmohamed/2bf3021ed15a42b6a6ba241a71157dc8 to your computer and use it in GitHub Desktop.
public func moviesCount() -> Int {
return self.movies.count
}
func movieName(index:Int) -> String {
let movie = self.movies[index]
if let movieName = movie.name {
return movieName
}
return ""
}
func movieRatting(index:Int) -> String {
let movie = self.movies[index]
if let movieRatting = movie.rating {
return movieRatting
}
return ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment