Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Ludaxord/Omni-Lite

Repository files navigation

PROJECT HAS BEEN REUPLOAD TO GITHUB AND HAS BEEN DISCONTINUED IN 2018

Omni LITE

omni lite

Short description

Application Omni LITE is based on API available at http://omni-content.omni.news.

Detailed description

Application is simple article & topic presenter. Based on http://omni-content.omni.news.

Tested on:

  1. iPhone Xr (Simulator)
  2. iPhone Xs Max (Simulator)
  3. iPhone 8 Plus (Physical Device)
  • Main features:
  1. Option to find article by query.
  2. Display list of articles that was fetched from server.
  3. Display details of article from articles list.
  4. It only use Storyboard for launchScreen.
  5. Views are generated in code.
  6. Implements dependency injection stored in initDependencies() function in AppDelegate.swift
  • Views:

    Articles List

    list

    List contains navigation bar with button that gives possibility to search for articles for user typed query. It also has table to display all articles. As default it shows articles for query = ""

    Article Search

    search

    Article search its popup view that gives possibility to pass query and fetch articles connected with that query.

    Article Details

    details

    Article details display details of article. It can be reached from Articles list by selecting cell with specific article.

  • Project structure:

structure

Extensions:

extension

Description:

Folder contains every swift extension.

Files:

UIBarButtonItemExtension.swift - extension contains everything that can be connected with UIBarButtonItem from UIKit

Views:

extension

Description:

Folder contains two folders:

  • Components:

    Contains UIKit custom components, modified to fit more to project requirements

    Files:

    OmniNavBar.swift - modified UINavigationBar class with custom constructors which at default create UINavigationItem and add it to OmniNavBar

    OmniNavButton.swift - modified UIBarButtonItem class with custom constructors which creates custom views of UIBarButtonItem.OmniNavButton need to be added to OmniNavBar.

    OmniTableView.swift - modified UITableView class with implemented UITableViewDelegate and UITableViewDataSource classes.

    OmniSearchAlert.swift - modified UIAlertController with custom buttons and UITextField to pass searched query.

  • Cells:

    Contains custom UITableViewCell classes with custom UIKit classes added.

    Files:

    ArticleCell.swift - custom cell for article displaying contains: UIView, UILabel, UIImageView.

Protocols

protocols

Description

Folder contains every swift protocol.

Files:

ApiProtocol.swift - protocol that contains what have to be implemented to API class

Http

http

Description:

Folder contains two folders:

  • Base:

    Base folder contains Http classes that are inherited by classes included in Custom folder.

    Files:

    API.swift - class contains base of http requests. It also implements ApiProtocol protocol

  • Custom:

    Custom folder contains Http classes for specific actions more detailed. Every Custom class inherits class from Base folder.

    Files:

    Omni.swift - class contains HTTP Requests connected with Omni API. It also is responsible to sort data from JSONs to Models or Swift data types.

Models

models

Description:

Folder contains Models that are containers of data for example data fetched from server.

Files:

Article.swift - struct that sorts and store data fetched from search/ function from http://omni-content.omni.news API.

AddOns

addons

Description:

Folder contains every data that doesn't fits requirements of any other folder.

Files:

Info.plist - Information Property List that are required for iOS Projects. Here are stored information about project.

Omni_Lite.xcdatamodeld - It is file that is used by CoreData framework.

Statics.swift - It is a swift struct that contains static values like strings or integers that can be reused in many situations.

uiPreferences.swift - It is a class that contains UI options like screen size.

Storyboards

storyboards

Description:

Folder contains storyboard files but like it was mention in main features application only uses LaunchScreen.storyboard

Files:

LaunchScreen.storyboard - Launch Screen of application

Main.storyboard - Main storyboard of application. This application doesn't use it at all because all view are generated in swift files.

Controllers

controllers

Description:

Folder contains two folders:

  • Base:

    Base folder contains Controller classes that are inherited by classes included in Custom folder. Base Controllers are inherit from UIViewController

    Files:

    ViewController.swift - This is a base Controller that has collection of methods that can be used in every Custom ViewController. It also has custom constructor that are responsible for dependency injection.

  • Custom:

    Custom folder contains Controller classes for specific actions more detailed. Every Custom class inherits class from Base folder.

    Files:

    ArticlesListController.swift - It is main Controller of Application it inherits from ViewController from Base folder. It is responsible for displaying OmniTableView and presents all data fetched from server.

    ArticleDetailsController.swift - It can be presented from ArticlesListController and it also inherits from ViewController.

Delegates

delegates

Description:

Folder contains Delegates.

Files:

AppDelegate.swift - It is a main UIApplicationDelegate that is generated with new xCode Project. In this project it contains custom function initDependencies() that is responsible for initialize dependencies to ViewControllers. initDependencies() is called in application.didFinishLaunchingWithOptions

Run

To run application just download repository and open Omni Lite.xcworkspace in xCode (Omni Lite.xcworkspace open application with CocoaPods included). Don't forget to change signing certificate to run application in your environment. When xCode doesn't show any error press Run button to install application on your simulator/device

TODO:

  1. Fix landscape mode
  2. Add Topics UITableView - Right now can't fetch any topics (Array was always empty) so it was skipped for now.
  3. Implement tests
  4. Fix UI - make it more modern
  5. Add Animations
  6. Fix UI to different types of device.

About

iOS application based on Swift

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published