Skip to content

Commit

Permalink
Merge pull request #40 from wordpress-mobile/fix/fancy-alert-dark-mode
Browse files Browse the repository at this point in the history
[Dark Mode] Fix the Fancy Alert View background colors
  • Loading branch information
danielebogo authored Sep 4, 2019
2 parents f5b4847 + a7e9945 commit 64ca931
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion WordPressUI.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "WordPressUI"
s.version = "1.3.5-beta.1"
s.version = "1.3.5-beta.2"
s.summary = "Home of reusable WordPress UI components."

s.description = <<-DESC
Expand Down
23 changes: 23 additions & 0 deletions WordPressUI/FancyAlert/FancyAlertView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ open class FancyAlertView: UIView {
/// Body
///
@IBOutlet weak var bodyLabel: UILabel!
@IBOutlet weak var bodyWrapperView: UIView!

/// Dividers
///
Expand Down Expand Up @@ -82,6 +83,17 @@ open class FancyAlertView: UIView {
}
}

/// BodyWrapper: backgroundColor
///
@objc public dynamic var bodyBackgroundColor: UIColor? {
get {
return bodyWrapperView.backgroundColor
}
set {
bodyWrapperView.backgroundColor = newValue
}
}

/// TitleLabel: Font
///
@objc public dynamic var titleFont: UIFont? {
Expand Down Expand Up @@ -172,6 +184,17 @@ open class FancyAlertView: UIView {
}
}

/// ButtonWrapper: backgroundColor
///
@objc public dynamic var bottomBackgroundColor: UIColor? {
get {
return buttonWrapperView.backgroundColor
}
set {
buttonWrapperView.backgroundColor = newValue
}
}


/// Switches the button ButtonStackView's layout, if needed.
///
Expand Down
9 changes: 4 additions & 5 deletions WordPressUI/FancyAlert/FancyAlerts.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="ZA1-84-qnC">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="ZA1-84-qnC">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -231,6 +229,7 @@
</constraints>
<connections>
<outlet property="bodyLabel" destination="OPz-wQ-LdM" id="rri-jS-Dkc"/>
<outlet property="bodyWrapperView" destination="rzT-7k-QCD" id="zeJ-jV-Dz8"/>
<outlet property="bottomDividerView" destination="SLm-WS-1GK" id="aag-9a-Hrd"/>
<outlet property="bottomSwitch" destination="iHe-6E-4yN" id="962-d9-gjB"/>
<outlet property="bottomSwitchLabel" destination="Vow-oZ-nG9" id="Hib-09-hIA"/>
Expand Down

0 comments on commit 64ca931

Please sign in to comment.