Skip to content

Commit 5b7b36a

Browse files
author
Ian Gordon
committed
Add IB_DESIGNABLE to Switch to allow it to show up in IB.
Test Plan: Add an MDCSwitch to a storyboard. MDCSwitch should render in Interface Builder / Xcode. Add an MDCSlider to a storyboard. MDCSlider should render in Interface Builder / Xcode. Reviewers: ajsecord, #material_components_ios_owners Reviewed By: ajsecord, #material_components_ios_owners Projects: #material_components_ios Differential Revision: http://codereview.cc/D127
1 parent cdcd458 commit 5b7b36a

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

components/Slider/src/MDCSlider.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
3636
@ingroup Slider
3737
*/
38+
IB_DESIGNABLE
3839
@interface MDCSlider : UIControl <NSCoding>
3940

4041
/**

components/Switch/SwitchAutolayout/Base.lproj/Main.storyboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<rect key="frame" x="276" y="63" width="51" height="31"/>
2828
</switch>
2929
</subviews>
30-
<color key="backgroundColor" red="0.90196079019999997" green="0.90196079019999997" blue="0.90196079019999997" alpha="1" colorSpace="calibratedRGB"/>
30+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
3131
<constraints>
3232
<constraint firstItem="6y5-Bf-Aj4" firstAttribute="top" secondItem="eWK-42-F2X" secondAttribute="bottom" constant="8" id="7iu-1j-2cK"/>
3333
<constraint firstItem="eWK-42-F2X" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="8" id="Ovn-uT-lwy"/>

components/Switch/src/MDCSwitch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ CG_EXTERN CGSize MDCSwitchSizeThatFits(CGSize size);
2828
*
2929
*/
3030
NS_CLASS_AVAILABLE_IOS(7_0)
31+
IB_DESIGNABLE
3132
@interface MDCSwitch : UIControl <NSCoding>
3233

3334
// TODO(iangordon): Unify our Color handling over all of our components

0 commit comments

Comments
 (0)