Git Product home page Git Product logo

ios-wanted-gyrodata's Introduction

README

GyroData

6축 데이터(acc 3축 + gyro 3축)를 실시간으로 측정하는 앱

프로젝트 기간: 2023.06.12 - 2023.06.18

개발자

리지
Github Profile

목차

  1. 실행 화면
  2. 앱 기능
  3. 적용 기술
  4. 추가구현

실행 화면

RPReplay_Final1687062766.mp4

앱 기능

  • 측정 버튼을 눌러 Acc, Gyro 타입의 데이터를 선택하여 측정
  • Swipe하여 delete 또는 play
  • play 버튼 클릭시 저장된 데이터 실시간으로 화면에 그리기
  • 저장된 List 클릭시 view 모드로 저장된 데이터 띄우기

메인 화면 삭제 측정 화면 play 모드 view 모드

적용 기술

UI Local DB Reactive Architecture
UIKit CoreData, FileManager Combine MVVM

세부 내용

화면구현

  • UIKit을 사용하여 코드베이스로 UI를 구성하였습니다.
  • 총 3개의 화면으로 구성되어 있습니다.
    • GyroDataList 화면
    • Measurement 화면
    • Detail (view 모드, play 모드) 화면
  • GyroDataList 화면은 UITableView를 활용하였습니다.
  • 데이터 구성은 DiffableDataSource, NSDiffableDataSourceSnapshot를 사용하였습니다.
  • Measurement 화면은 segmentedControl, 그래프 view, 버튼 2개로 구현되어 있어 값을 측정할 수 있습니다.
  • Detail 화면은 2가지 모드가 있어 cell을 선택하면 view모드가 선택되어 저장된 값을 화면에 보여주고, Swipe action을 통해 play 버튼을 선택하면 play 모드가 선택되어 실시간으로 그래프를 그려줍니다.

DataBase

  • 측정한 값은 CoreData와 FileManager로 저장되고 CoreData에는 날짜, 제목, 측정시간이 저장되고 FileManager에는 측정한 값을 JSON 파일로 encoding하여 저장됩니다.
  • List 화면에 띄우는 정보는 CoreData에서 가져옵니다.
  • 그래프 화면에 띄우는 정보는 FileManager에 저장된 JSON 파일을 Decoding하여 가져옵니다.

Reactive, Architecture

  • ViewController의 역할을 분리하고자 MVVM 패턴을 사용하였습니다.
  • View - ViewModel간 바인딩시 Apple에서 제공하는 Combine 프레임워크를 사용하였습니다.

추가구현

  • 디자인 패턴중 Builder 패턴을 활용하여 AlertBuilder를 구현하였습니다.
private func showAlert(_ title: String, _ message: String) {
    let okSign = "확인"
    AlertBuilder(viewController: self)
        .withTitle(title)
        .andMessage(message)
        .preferredStyle(.alert)
        .onSuccessAction(title: okSign) { _ in }
        .showAlert()
}

ios-wanted-gyrodata's People

Contributors

yijiye avatar soo941226 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.