Coder Social home page Coder Social logo

aword's Introduction

AWord

일정: 2021.11.29 ~2021.12.7

영어 단어장 애플리케이션 (개인 프로젝트)

기술

  • CoreData
  • RxSwift
  • RxDataSource
  • SnapKit

설명

Link

aword's People

Stargazers

 avatar

Watchers

 avatar

aword's Issues

Core Data Relation 문제

WordSet 으로 Word 에 1:N 으로 접근할 수 있도록 했는데
WordSet 을 선택하면 [Word] 이런 식으로 접근하고 싶은데 검색해도 잘 나오지 않음.

그래서 현재 Word 에 parentIdentity 라는 Attribute 를 생성하였고
WordSet 의 identity 로 filter 를 하여 Word 에 접근함

WordSet 의 identity -> Word 의 parentIdentity

private lazy var sectionModel: WordSectionModel = {
// 1. Word 를 전부 꺼내옴
    let fetchRequest = NSFetchRequest<WordEntity>(entityName: "Word")
// 2. Word 의 definition 으로 정렬함
    let sort = NSSortDescriptor(key: "definition", ascending: true)
    fetchRequest.sortDescriptors = [sort]
    
// 3. 가져온 값 (WordEntity) 의 parentIdentity 와 WordSet 의 parentIdentity 와 비교하여 값을 찾아서 사용함
    if let words = try? context.fetch(fetchRequest)
        .filter({ $0.parentIdentity == parentIdentity })
        .map({ Word(entity: $0) }) {
            return WordSectionModel(model: 0, items: words)
        }
    return WordSectionModel(model: 0, items: [])
}()

WordSetTableView Item Move

Source 에서 Destination 으로 잘 이동하지만,

이동되고 난 후 titleLabel 은 정상적으로 업데이트 되지 않는 모습이 있음.

AlertView (Instance) + RxSwift

AlertView 가 deinit 되고 난 후 TestViewModel 에 있는 next method 가 호출 될 수 있도록 하기

TestViewModel 에 있는 testResultAlert method 에서 next method 를 호출하면
Reentrancy anomaly was detected 라고 나옴 (RxSwift 에러 같음)

Core Data 정렬 문제

TableView 의 기능으로 source 와 destination 을 얻어 정렬하려 했는데
Memory 로 했을 때는 정렬이 잘 되었지만
CoreData 로 할 때는 잘 안됌.

현재 Edit Row 는 불가능하게 함.

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.