Skip to content

Commit

Permalink
Updated for Material Components for iOS v35.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ilap committed Sep 23, 2017
1 parent 23179a8 commit ac2f023
Show file tree
Hide file tree
Showing 21 changed files with 62 additions and 1 deletion.
4 changes: 4 additions & 0 deletions MaterialComponentsXamarinExamples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ Global
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
version = 35.0.0
Policies = $0
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = PrefixedHierarchical
$0.VersionControlPolicy = $2
EndGlobalSection
EndGlobal
Binary file modified references/MDFTextAccessibility.framework/Info.plist
Binary file not shown.
Binary file not shown.
38 changes: 38 additions & 0 deletions references/MaterialComponents.framework/Headers/MDCButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,44 @@
*/
- (void)setBorderWidth:(CGFloat)borderWidth forState:(UIControlState)state UI_APPEARANCE_SELECTOR;

/**
Sets this button's layer's shadowColor for the specified control state.
During initialization, the value for @c UIControlStateNormal is set to the value of this button's
layer's @c shadowColor. Providing a @c nil value for @c shadowColor will remove the shadow color
mapping for the specified state.
If the color is not set for a specified state, the default behavior is to use the color associated
with @c UIControlStateNormal. If the color for @c UIControlStateNormal is not set, then @c nil will
be used.
@param shadowColor The shadow color to use for the specified state.
@param state The state that uses the specified color. The possible values are described in
@c UIControlState.
*/
- (void)setShadowColor:(nullable UIColor *)shadowColor
forState:(UIControlState)state UI_APPEARANCE_SELECTOR;

/**
The color used as this button's layer's @c shadowColor for the specified control state.
During initialization, the value for @c UIControlStateNormal is set to the value of this view's
layer's @c shadowColor.
If the color is not set for a specified state, the default behavior is to use the color associated
with @c UIControlStateNormal. If the color for @c UIControlStateNormal has not been set, then
@c nil is returned.
@param state The state that uses the shadow color. The possible values are described in
@c UIControlState.
@return The shadow color for the specified state. If no shadow color has been set for the
specific state, this method returns the shadow color associated with the
@c UIControlStateNormal state.
@return The shadow color.
*/
- (nullable UIColor *)shadowColorForState:(UIControlState)state;

#pragma mark - UIButton changes

/**
Expand Down
Binary file modified references/MaterialComponents.framework/Info.plist
Binary file not shown.
Binary file modified references/MaterialComponents.framework/MaterialComponents
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,23 @@
limitations under the License.
*/

#import <Availability.h>
#import <Foundation/Foundation.h>

// This macro is introduced in Xcode 9.
#ifndef CF_TYPED_ENUM // What follows is backwards compat for Xcode 8 and below.
#if __has_attribute(swift_wrapper)
#define CF_TYPED_ENUM __attribute__((swift_wrapper(enum)))
#else
#define CF_TYPED_ENUM
#endif
#endif

/**
A representation of an animatable key path. Likely not exhaustive.
*/
NS_SWIFT_NAME(AnimatableKeyPath)
typedef NSString * const MDMAnimatableKeyPath __attribute__((swift_wrapper(enum)));
typedef NSString * const MDMAnimatableKeyPath CF_TYPED_ENUM;

FOUNDATION_EXPORT MDMAnimatableKeyPath MDMKeyPathCornerRadius NS_SWIFT_NAME(cornerRadius);
FOUNDATION_EXPORT MDMAnimatableKeyPath MDMKeyPathHeight NS_SWIFT_NAME(height);
Expand Down
Binary file modified references/MotionAnimator.framework/Info.plist
Binary file not shown.
Binary file modified references/MotionAnimator.framework/MotionAnimator
Binary file not shown.
Binary file modified references/MotionInterchange.framework/Info.plist
Binary file not shown.
Binary file modified references/MotionInterchange.framework/MotionInterchange
Binary file not shown.
Binary file modified references/MotionTransitioning.framework/Info.plist
Binary file not shown.
Binary file modified references/MotionTransitioning.framework/MotionTransitioning
Binary file not shown.
9 changes: 9 additions & 0 deletions src/MaterialComponents/MaterialButtons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ interface MDCButton
[Export("setBorderWidth:forState:")]
void SetBorderWidth(nfloat borderWidth, UIControlState state);

// -(void)setShadowColor:(UIColor * _Nullable)shadowColor forState:(UIControlState)state __attribute__((annotate("ui_appearance_selector")));
[Export("setShadowColor:forState:")]
void SetShadowColor([NullAllowed] UIColor shadowColor, UIControlState state);

// -(UIColor * _Nullable)shadowColorForState:(UIControlState)state;
[Export("shadowColorForState:")]
[return: NullAllowed]
UIColor ShadowColorForState(UIControlState state);

// @property (nonatomic, strong) UIColor * _Nullable customTitleColor __attribute__((deprecated("Use setTitleColor:forState: instead"))) __attribute__((annotate("ui_appearance_selector")));
[NullAllowed, Export ("customTitleColor", ArgumentSemantic.Strong)]
UIColor CustomTitleColor { get; set; }
Expand Down

0 comments on commit ac2f023

Please sign in to comment.