Aging FRIENDS App for iOS Using Swift

Overview

Aging F.R.I.E.N.D.S

๐ŸŽต So no one told you how old they are ? ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

Ever wondered how old the FRIENDS cast are ? Let's find out !

Reemz.Mac.48452.-.VNC.Viewer.2021-12-11.14-37-22_Trim.mp4

App Interface

The app starts with a group of cards each representing a character of the series along with a random age assigned to each character because they are ๐ŸŒŸ AGELESS ๐ŸŒŸ , and it shows:

1) Character Card

The characters related info are stored in a dictionary named (cast) in the following order :

  • Character Name
  • Character Image
  • Character Role
  • Character Nickname
  • Character Summary Note : age is randomly generated we don't need to store it in the dictionary
 var cast = [
       ("Mr.Heckles","Heckles","Retired - Complaining 24/7","Old Man Heckles,The Weird Man","Mr. Heckles lived in the apartment below Monica and Rachel. He often complained about the apparent noise that the two made, either in person or by tapping on his apartment ceiling with a broom ! "),
       
       ("Janice","Janice","OH MY GOD !","Just Janice","She is known for her obnoxious and nasally voice and her trademark cry of \"OH MY GOD!\"")]

Each card will only display 4 details which are (Name , Image , Role , Age), and for the age, it will be a random number between 5 to 85 which will be displayed using (AgeLabel)

  • Note : that the age will change each time the app runs because it is random
cell.AgeLabel.text = "Age : \(Int.random(in: 5...85)) Years Old"// random age changing with every run :)

image

2) Character Info Dialog

On the right-top corner of the card there is an info button which will display an alert dialog viewing more info about the character, which are :

  • Character Image
  • Character Nickname
  • Character Summary
@IBAction func infoButtonPressed(_ sender: UITableViewCell) {
       var currentCast = cast[sender.tag]// making use of the tags i assigned at (line 49) to get the corresponding cast member
       
       let alert = UIAlertController(title: "\(currentCast.0) !", message: "\nNickname:\n\(currentCast.3)\n\nAbout:\n\(currentCast.4)" , preferredStyle: UIAlertController.Style.alert)
       
       var imageView = UIImageView(frame: CGRect(x: 60, y: -150, width: 150, height: 150))//adding image at the top of the alert
       imageView.image = UIImage(named:currentCast.1)
       alert.view.addSubview(imageView)
       // add an action (button)
       alert.addAction(UIAlertAction(title: "ok", style: UIAlertAction.Style.default, handler: { action in self}))
       // show the alert
       self.present(alert, animated: true, completion: nil)
   }

image

You might also like...
macOS app to generate Swift 5 code for models from JSON (with Codeable)
macOS app to generate Swift 5 code for models from JSON (with Codeable)

SwiftyJSONAccelerator - MacOS app Codeable Model file Generator For Swift 5 Version v2.2 Generate initializer function for classes Application Downloa

Camera App Built With Swift
Camera App Built With Swift

Camera App Hi there! me Aldanah Aldohayan and Ebtesam Alahmari worked in this project in the end of week8 of Tuwaiq's bootcamp How did we build this A

Tourist App enable users to search about touristic places in saudi arabia

TouristApp Project Name: Tourist Project Description : Tourist it's App enable users to search about touristic places in saudi arabia . Features List:

The app that cuts out the person and synthesizes the background
The app that cuts out the person and synthesizes the background

PersonSegmentationSampler The app that cuts out the person and synthesizes the background. How to build 1, Download or Clone this project and open in

Financial Education app focused on young people

Fin4teen Aplicativo de Educaรงรฃo Financeira com foco em jovens. Tรณpicos Descriรงรฃo

HandyJSON is a framework written in Swift which to make converting model objects to and from JSON easy on iOS.

HandyJSON To deal with crash on iOS 14 beta4 please try version 5.0.3-beta HandyJSON is a framework written in Swift which to make converting model ob

A library of Swift extensions to turbocharge your iOS development.
A library of Swift extensions to turbocharge your iOS development.

Alexandria A library of Swift extensions to turbocharge your iOS development. Background Here at Oven Bits, we love Swift. We started using it when it

An iOS framework for creating JSON-based models. Written in Swift.
An iOS framework for creating JSON-based models. Written in Swift.

An iOS framework for creating JSON-based models. Written in Swift (because it totally rules!) Requirements iOS 8.0+ Xcode 7.3 Swift 2.2 Installation E

JSEN (JSON Swift Enum Notation) is a lightweight enum representation of a JSON, written in Swift.

JSEN /หˆdส’eษชsษ™n/ JAY-sษ™n JSEN (JSON Swift Enum Notation) is a lightweight enum representation of a JSON, written in Swift. A JSON, as defined in the EC

Owner
Reem
I'm just a Cloud โ˜๏ธ
Reem
Developed with use Swift language. As a third party library used SDWebImage. JSON parsing using URLSession with TMDB API. This app provide by the Core Data structure.

Capstone Project ?? About Developed with use Swift language. As a third party library used SDWebImage. JSON parsing using URLSession with TMDB API. Ad

Ensar Batuhan Unverdi 9 Aug 22, 2022
App uses API to display information about City and State user using expandable table cell

Expandable Table Cell iOS App App uses API to display information about City and State user using expandable table cell Implemented Using MVVM with Cl

null 2 Nov 30, 2021
Simple implementation of asset management app UI using swiftUI

MyAssets (์ž์‚ฐ๊ด€๋ฆฌ ์•ฑ ๋งŒ๋“ค๊ธฐ) swiftUI๋ฅผ ์ด์šฉํ•˜์—ฌ ์ž์‚ฐ๊ด€๋ฆฌ ์•ฑ UI๋ฅผ ๊ฐ„๋žตํ•˜๊ฒŒ ๊ตฌํ˜„ (swiftUI๋ฅผ ์ตํžˆ๊ธฐ ์œ„ํ•จ) ์ดˆ๊ธฐ ํ™”๋ฉด 1. Tab bar ๊ตฌํ˜„ ์ž์‚ฐ, ์ถ”์ฒœ, ์•Œ๋žŒ, ์„ค์ • ํƒญ ๊ตฌํ˜„ 2. Navigation bar ๊ตฌํ˜„ 1) leading์— titl

null 0 Dec 9, 2021
Nikolai Saganenko 1 Jan 9, 2022
An advanced Swift (IOS Native) application that uses SOLID architectural principles, consumes a RESTFUL Service, downloads & images using best practices.

dog-playground-ios An advanced Swift (IOS Native) application that uses SOLID architectural principles, consumes a RESTFUL Service, downloads & im

Amose Suwali 1 Jan 10, 2022
AlamofireObjectMappe - An Alamofire extension which converts JSON response data into swift objects using ObjectMapper

AlamofireObjectMapper An extension to Alamofire which automatically converts JSON response data into swift objects using ObjectMapper. Usage Given a U

Tristan Himmelman 2.6k Dec 29, 2022
YamlSwift - Load YAML and JSON documents using Swift

YamlSwift parses a string of YAML document(s) (or a JSON document) and returns a Yaml enum value representing that string.

Behrang Norouzinia 384 Nov 11, 2022
Easy JSON to NSObject mapping using Cocoa's key value coding (KVC)

#Motis Object Mapping Easy JSON to NSObject mapping using Cocoa's key value coding (KVC) Motis is a user-friendly interface with Key Value Coding that

Mobile Jazz 249 Jun 29, 2022
Coding Challenge using NYC JSON data

Coding Challenge using NYC JSON data This was my submission to JPMorgan's code challenge prior to an interview. It represents my solution to asyncrono

null 0 Dec 9, 2021
iTunesSearch: a screenshot listing project that using iTunes Search API

iTunesSearch iTunesSearch is a screenshot listing project that using iTunes Search API. This project written in Swift with MVVM architecture. Installa

null 0 Dec 14, 2021