-
Notifications
You must be signed in to change notification settings - Fork 20
Tags #32
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
base: master
Are you sure you want to change the base?
Conversation
sudoShiba
commented
Dec 14, 2025
icons not working yet
kwikenkwak
left a comment
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.
Ik ga eerlijk zijn, ik ken echt niet veel van swift, dus ik kan niet veel zeggen over code quality. Ik hoop gewoon dat dit niet kan zorgen voor vage crashes haha. En ik kan het zelf ook niet op een ios device testen dus ik vertrouw erop dat sizing/coloring nu helemaal goed zit
|
|
||
| #### Custom Tag Icons | ||
|
|
||
| The library includes built-in icon support for: `bed`, `alert`, `fail`, `success`, `drink`. These tags will display as icons instead of text. If you add them to your app's Assets.xcassets |
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.
Dit is niet correct
| To add your own custom tag icons: | ||
|
|
||
| 1. **Add to your app's Asset Catalog** (Recommended): | ||
| - Open your app's `Assets.xcassets` | ||
| - Add a new Image Set for each icon (e.g., "meeting", "personal") | ||
| - Add PNG or PDF images to the image sets | ||
| - Use the image set name as the tag name | ||
|
|
||
| 2. **Using PNG/PDF files**: | ||
| - Add PNG or PDF files to your app bundle | ||
| - Name them to match your tag names (e.g., "meeting.png") | ||
| - The library will automatically find and use them | ||
|
|
||
| The library searches for icons in this order: | ||
| 1. Main app bundle's Asset Catalog | ||
| 2. Framework bundle's Asset Catalog | ||
| 3. Framework's Assets/tags directory (PNG/PDF) | ||
|
|
||
| Tags without matching icons will be displayed as text pills with the event color. | ||
|
|
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.
Wat met die pdf files? Miss dit gewoon of fixen of weghalen
| @@ -131,13 +152,22 @@ open class EventData: NSObject, NSCoding { | |||
| let dColor = coder.decodeObject(forKey: EventDataEncoderKey.color) as? UIColor { | |||
| let dGradientLayer = coder.decodeObject(forKey: EventDataEncoderKey.gradientLayer) as? CAGradientLayer | |||
| let dAllDay = coder.decodeBool(forKey: EventDataEncoderKey.allDay) | |||
| let dTagNames = coder.decodeObject(forKey: EventDataEncoderKey.tags) as? [String] ?? [] | |||
| let dTagColors = coder.decodeObject(forKey: "tagColors") as? [UIColor] ?? [] | |||
| // Reconstruct EventTag objects from decoded arrays | |||
| var eventTags: [EventTag] = [] | |||
| for i in 0..<dTagNames.count { | |||
| let color = i < dTagColors.count ? dTagColors[i] : UIColor.white | |||
| eventTags.append(EventTag(name: dTagNames[i], color: color)) | |||
| } | |||
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.
Waaarom encoden we dat eigenlijk naar arrays? Want er staat 'backwards compatiblity' maar da is toch helemaal ni relevant hier? Kdenk dat dit wel wat mooier/korter kan