Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat [#81] HomeView Video 추가 #90

Merged
merged 17 commits into from
Jan 16, 2024
Merged

Conversation

boyeon0119
Copy link
Contributor

👾 작업 내용

비디오 뷰 추가

  • 프로그래스 바 퍼센트 값에 따라 보여줘야하는 영상을 홈 뷰에 추가했습니다. (Thanks To 킹갓제너럴최고존엄익범)
  • 뷰컨트롤러에서 실패하는 경우엔 비디오가 아닌 이미지가 보여지도록 했슴니다.
if totalAppUsingTimeData.isFailed {
                blackholeImageCell.configureCell(
                    image: blackHoleModel[BlackHoleDataType.fail.rawValue].image,
                    videoUrl: blackHoleModel[BlackHoleDataType.fail.rawValue].videoItem,
                    text: blackHoleModel[BlackHoleDataType.fail.rawValue].text
                )
}

데이터 모델 관리

  • 추후에 있을 서버통신을 위해 데이터를 쪼갰슴니다.
struct TotalAppUsingTimeDataModel {
    var onboardingTotalGoalTime: Float
    var totalAppRemainedTime: Float
    var isFailed: Bool
    
    static func calculateTotalUsageTime(data: [AppUsingTimeModel]) -> Int {
        return data.reduce(0) { $0 + Int($1.usedTime) }
    }
}

🚀 PR Point

전체적으로 코드를 조금 정리했슴니다..

  • video 관련 코드 보다는 Model과 Cell 부분에서의 데이터 이동 관련 코드를 조금 더 봐주시면 감사하겟슴니다.

📸 스크린샷

구현 내용 스크린샷
비디오 홈 뷰

🚀 기기 대응

기기명 Iphone 13 mini Iphone 14 Iphone 15 pro Iphone SE(3rd)
스크린샷

✅ Issue

Resolved #81

@boyeon0119 boyeon0119 added 🙊보연 보연의 issue 🌈 feat 기능 구현 labels Jan 15, 2024
@boyeon0119 boyeon0119 added this to the 🚀1차 스프린트🚀 milestone Jan 15, 2024
@boyeon0119 boyeon0119 self-assigned this Jan 15, 2024
Copy link
Member

@Zoe0929 Zoe0929 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P5. 고생하셨습니다 ❤️ 비디오는 이렇게 처리하는 거 군요!

self.avPlayer?.play()
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P4. 여기 줄바꿈 하나만요!

Copy link
Member

@kim-seonwoo kim-seonwoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~👍

Comment on lines +28 to +30
// // 영상 로딩을 위한 애니메이션 코드
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
// self.totalAppUsingTimeData.progressValue += 0.01
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5. 주석 부분 검토 부탁드립니다~!

@boyeon0119 boyeon0119 merged commit de9647b into develop Jan 16, 2024
@Zoe0929 Zoe0929 deleted the feat/#81-homeViewVideo branch January 19, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌈 feat 기능 구현 🙊보연 보연의 issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feat] 홈 뷰 동영상 추가 및 추가 분기처리
3 participants