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

Darkmode #216

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
619cca9
Add new color support for pre ios 13
lkeude96 Oct 13, 2019
af32858
Create System theme
lkeude96 Oct 17, 2019
ca764c1
Applying new bg colors and returning UIColor instead CGColor for traits
lkeude96 Oct 19, 2019
99d8701
Update the CardPartStackView example to use dynamic colors
lkeude96 Oct 30, 2019
be4b147
Update tableview cardpart to use dynamic colors
lkeude96 Oct 30, 2019
e92d118
Update Collectionview example to use dynamic colors
lkeude96 Oct 30, 2019
ec054ec
Update cardpart's pagedview
lkeude96 Oct 30, 2019
f186c4b
Update Barview to use dynamic colors
lkeude96 Oct 30, 2019
a5a67a1
Update border colors to be dynamic, started on shadows as well
lkeude96 Oct 30, 2019
50581b1
Update PillLabel example to use dynamic colors
lkeude96 Oct 30, 2019
6efe5ed
Update rounded stackview example to use dynamic colors
lkeude96 Oct 30, 2019
a8c0865
Update iconlabel card example to use dynamic colors
lkeude96 Oct 30, 2019
8935c90
Update Progress bar view to use dynamic colors
lkeude96 Oct 30, 2019
3e27d41
Update fullscreen vc to use theme's bgColor
lkeude96 Oct 30, 2019
8b50193
Update confetti view 's default colors to use dynamic color
lkeude96 Oct 30, 2019
53f469b
Add custom theme, remove turbo / mint reference and cleanup
lkeude96 Oct 30, 2019
9dd7f43
Add dynamic colors for confetti
lkeude96 Oct 30, 2019
e013f7e
Update radioButton card to use dynamic colors
lkeude96 Oct 30, 2019
fd1ba75
Update tableview cell's test to use dynamic colors instead
lkeude96 Oct 31, 2019
5f19002
Merge branch 'master' into dark-mode
croossin Nov 12, 2019
cfe5770
Update where we override apply the custom themes
lkeude96 Nov 19, 2019
73cd9fd
Merge conflicts
croossin Jan 7, 2020
8dc2474
Remove background on image to support darkmode
croossin Jan 7, 2020
adca0a1
More dark mode cleanup for attributedtext
croossin Jan 7, 2020
6a2c87f
Working on attributedtext dark mode
croossin Jan 10, 2020
57d6cce
Merge branch 'master' into darkmode
croossin Jan 10, 2020
e61e47e
Merge conflicts
croossin Jan 22, 2020
45fabd5
Update README with darkmode
croossin Jan 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ CardParts - made with ❤️ by Intuit:
- [Themes](#themes)
- [Clickable Cards](#clickable-cards)
- [Listeners](#listeners)
- [Dark Mode](#dark-mode)
- [Apps That Love CardParts](#apps-that-love-cardparts)
- [Publications](#publications)
- [License](#license)
Expand Down Expand Up @@ -232,7 +233,7 @@ class MyCardsViewController: CardsViewController {
super.init(nibName: nil, bundle: nil)
self.cardCellMargins = UIEdgeInsets(/* custom card margins */)
}

...
}
```
Expand Down Expand Up @@ -387,7 +388,7 @@ Use this protocol to specifiy a custom margin for the card, implement `customMar

## `CardPartsViewController`

CardPartsViewController implements the CardController protocol and builds its card UI by displaying one or more card part views using an MVVM pattern that includes automatic data binding. Each CardPartsViewController displays a list of CardPartView as its subviews. Each CardPartView renders as a row in the card. The CardParts framework implements several different types of CardPartView that display basic views, such as title, text, image, button, separator, etc. All CardPartView implemented by the framework are already styled to correctly match the applied
CardPartsViewController implements the CardController protocol and builds its card UI by displaying one or more card part views using an MVVM pattern that includes automatic data binding. Each CardPartsViewController displays a list of CardPartView as its subviews. Each CardPartView renders as a row in the card. The CardParts framework implements several different types of CardPartView that display basic views, such as title, text, image, button, separator, etc. All CardPartView implemented by the framework are already styled to correctly match the applied
s UI guidelines.

In addition to the card parts, a CardPartsViewController also uses a view model to expose data properties that are bound to the card parts. The view model should contain all the business logic for the card, thus keeping the role of the CardPartsViewController to just creating its view parts and setting up bindings from the view model to the card parts. A simple implementation of a CardPartsViewController based card might look like the following:
Expand Down Expand Up @@ -564,7 +565,7 @@ let centerAligned = CardPartTitleDescriptionView(titlePosition: .top, secondaryP

#### `CardPartPillLabel`

CardPartPillLabel provides you the rounded corners, text aligned being at the center along with vertical and horizontal padding capability.
CardPartPillLabel provides you the rounded corners, text aligned being at the center along with vertical and horizontal padding capability.

```swift
var verticalPadding:CGFloat
Expand Down Expand Up @@ -622,6 +623,7 @@ let roundedStackView = CardPartStackView()
roundedStackView.cornerRadius = 10.0
roundedStackView.pinBackground(roundedStackView.backgroundView, to: roundedStackView)
```

<p align="center">
<img src="https://raw.githubusercontent.com/Intuit/CardParts/master/images/roundedStackView.png" width="300" alt="roundedStackView"/>
</p>
Expand Down Expand Up @@ -987,7 +989,7 @@ A `CardPartCenteredView` can take in any card part that conforms to `CardPartVie

#### `CardPartConfettiView`

Provides the capability to add confetti with various types ( diamonds, star, mixed ) and colors, along with different level of intensity
Provides the capability to add confetti with various types ( diamonds, star, mixed ) and colors, along with different level of intensity

```swift
let confettiView = CardPartConfettiView()
Expand Down Expand Up @@ -1037,13 +1039,13 @@ Here's a small example of how to reactively set the location from a changing add

### `CardPartRadioButton`

Provides the capability to add radio buttons with configurable inner/outer circle line width , colors along with tap etc..
Provides the capability to add radio buttons with configurable inner/outer circle line width , colors along with tap etc..

```swift
let radioButton = CardPartRadioButton()
radioButton.outerCircleColor = UIColor.orange
radioButton.outerCircleLineWidth = 2.0

radioButton2.rx.tap.subscribe(onNext: {
print("Radio Button Tapped")
}).disposed(by: bag)
Expand Down Expand Up @@ -1275,6 +1277,14 @@ extension MYOwnCardPartController: CardPartsLongPressGestureRecognizerDelegate {
}
```

# Dark Mode

CardParts now supports iOS 13's Dark Mode!

<p align="center">
<img src="https://raw.githubusercontent.com/Intuit/CardParts/master/images/darkmode.png" width="300" alt="darkmode"/>
</p>
croossin marked this conversation as resolved.
Show resolved Hide resolved

# Apps That Love CardParts

- [Mint - Personal Finance & Money](https://itunes.apple.com/us/app/mint-personal-finance-money/id300238550?mt=8)
Expand Down
Binary file added images/darkmode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.