-
Notifications
You must be signed in to change notification settings - Fork 5
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: 위젯 추가 (#364) #367
feat: 위젯 추가 (#364) #367
Conversation
- Color 를 확장하여서 위젯의 다크모드를 대응.
- WidgetsBundle 관련 파일 이동.
- Intent Definition File 에서 사용할 custom intent 를 타겟에 추가
- Configurable Widget 에서도 동적인 선택 목록을 설정할 수 있도록 dynamic options 설정. - MyCard 타입을 생성하여 파라미터로 설정. - MyCard 타입에서 cardID 로 선택목록을 구분하기 위해서 property 로 설정.
- custom intent 의 타입으로 선언했던 Card 가 중복된 이름으로 여겨져서 "multiple commands produce" 에러가 생겨서 MyCard 로 변경.
- 기존의 ConfigurationIntent 를 MyCardIntent 로 변경.
- 선택목록을 제공하지 않기 때문에 StaticConfiguration 사용. - image 로 UI 구현. - 위젯 선택시 동작이 예정되어 있기 때문에 widgetURL 사용. - QRCodeWidget 을 설명하는 내용 작성.
- accessoryCircular 를 추가하여 잠금화면 위젯 구현.
- 잠금화면 위젯으로만 사용하기 때문에 accessoryCircular 만 설정. - 선택목록을 제공하지 않기 때문에 StaticConfiguration 사용.
- 잠금화면 위젯이기 때문에 accessoryCircular 만 구현. - OpenAppLockScreenWidget 설명 작성.
트러블 슈팅도 추가해두었습니당~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
선생님 감사합니다, 위젯에 대해 아는것이 많이 없어 이렇게 밖에 코리를 못하지만서도, 집도의 데뷔를 축하드립니다,
import WidgetKit | ||
import SwiftUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이것부터 간지가 납니다.
case .accessoryCircular: | ||
ZStack { | ||
AccessoryWidgetBackground() | ||
Image("widgetQrLockscreenWhite") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저희 스보 사용하지 않으면 SwiftGen 한번 사용해서 오타 방지용으로 이미지 한번 constant로 만들어 놓을까요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오호.. 좋습니다..!
🌴 PR 요약
🌱 작업한 브랜치
🌱 작업한 내용
🚨 참고 사항
intent definition file 을 통해 intent 를 생성하고 타겟에서 사용하지 않아서 생기는 에러였습니다.
다음과 같이 추가해서 해결하였습니당
custom intent 의 타입으로 선언한 Card 가 중복된 이유였기 때문에(color asset 과 중복) 이를 MyCard 로 수정하였습니다.
📸 스크린샷
📮 관련 이슈