Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion React/Base/RCTUIKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ typedef UISwitch RCTUISwitch;
#else
@interface RCTUISwitch : NSSwitch
NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign, getter=isOn) BOOL on;
@property (nonatomic, getter=isOn) BOOL on;

- (void)setOn:(BOOL)on animated:(BOOL)animated;

Expand Down
2 changes: 1 addition & 1 deletion React/Base/macOS/RCTUIKit.m
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ - (BOOL)isOn

- (void)setOn:(BOOL)on
{
self.state = on ? NSControlStateValueOn : NSControlStateValueOff;
[self setOn:on animated:NO];
}

- (void)setOn:(BOOL)on animated:(BOOL)animated {
Expand Down
2 changes: 1 addition & 1 deletion React/Views/RCTSwitchManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ - (void)onChange:(RCTSwitch *)sender
if ([view isKindOfClass:[RCTSwitch class]]) {
[(RCTSwitch *)view setOn:value animated:NO];
} else {
RCTLogError(@"view type must be UISwitch");
RCTLogError(@"view type must be RCTUISwitch"); // [macOS]
}
}];
}
Expand Down