<commit_before>//
//  MKToggleView.h
//  RCTMaterialKit
//
//  Created by <NAME> on 15/7/25.
//  Copyright (c) 2015年 xinthink. All rights reserved.
//

#ifndef RCTMaterialKit_MKToggleView_h
#define RCTMaterialKit_MKToggleView_h

@import UIKit;
#import "MKLayer.h"

@class MKToggleControl;
@protocol MKToggleViewDelegate;

/*
 * Base class for toggle components
 */
@interface MKToggleView : UIControl

@property BOOL checked;
@property (readonly) MKToggleControl *toggleCtl;

@property (nonatomic, weak) id<MKToggleViewDelegate> delegate;

- (void)setupLayer;

@end


/*
 * Generic toggle view delegate protocol
 */
@protocol MKToggleViewDelegate <NSObject>

@required
- (void)toggleView:(MKToggleView*)view didToggled:(BOOL)checked;

@end


/*
 * Generic animated toggle control, used as subview
 */
@interface MKToggleControl : UIControl

@property UIColor *checkedColor;
@property BOOL checkedHighlightEnabled;


// -------------------------------
// common properties of MKLayers

@property BOOL maskEnabled;
@property BOOL rippleEnabled;
@property MKRippleLocation rippleLocation;
@property NSString *rippleLocationByName;
@property float ripplePercent;
@property float backgroundLayerCornerRadius;
@property float cornerRadius;

// animations
@property BOOL shadowAniEnabled;
@property BOOL backgroundAniEnabled;
@property float rippleAniDuration;
@property float backgroundAniDuration;
@property float shadowAniDuration;
@property MKTimingFunction *rippleAniTimingFunction;
@property NSString *rippleAniTimingFunctionByName;<commit_msg>make ToggleControl subclass of UIView<commit_after>//
//  MKToggleView.h
//  RCTMaterialKit
//
//  Created by <NAME> on 15/7/25.
//  Copyright (c) 2015年 xinthink. All rights reserved.
//

#ifndef RCTMaterialKit_MKToggleView_h
#define RCTMaterialKit_MKToggleView_h

@import UIKit;
#import "MKLayer.h"

@class MKToggleControl;
@protocol MKToggleViewDelegate;

/*
 * Base class for toggle components
 */
@interface MKToggleView : UIControl

@property BOOL checked;
@property (readonly) MKToggleControl *toggleCtl;

@property (nonatomic, weak) id<MKToggleViewDelegate> delegate;

- (void)setupLayer;

@end


/*
 * Generic toggle view delegate protocol
 */
@protocol MKToggleViewDelegate <NSObject>

@required
- (void)toggleView:(MKToggleView*)view didToggled:(BOOL)checked;

@end


/*
 * Generic animated toggle control, used as subview
 */
@interface MKToggleControl : UIView

@property UIColor *checkedColor;
@property BOOL checkedHighlightEnabled;


// -------------------------------
// common properties of MKLayers

@property BOOL maskEnabled;
@property BOOL rippleEnabled;
@property MKRippleLocation rippleLocation;
@property NSString *rippleLocationByName;
@property float ripplePercent;
@property float backgroundLayerCornerRadius;
@property float cornerRadius;

// animations
@property BOOL shadowAniEnabled;
@property BOOL backgroundAniEnabled;
@property float rippleAniDuration;
@property float backgroundAniDuration;
@property float shadowAniDuration;
@property MKTimingFunction *rippleAniTimingFunction;
@property NSString *rippleAniTimingFunctionByName;
{'fraction_non_alphanumeric': 0.10749919536530415, 'fraction_numerical': 0.005793369810106212, 'mean_word_length': 5.381930184804928, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '354803', 'n_tokens_mistral': 989, 'n_tokens_neox': 895, 'n_words': 251}