Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCTSwitch: Use NSSwitch instead of NSButton #924

Merged
merged 21 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c2b2e2f
add pull yml
Saadnajmi Mar 22, 2021
ab88c7d
Merge pull request #1 from microsoft/master
Saadnajmi Apr 2, 2021
7a9006b
match handleOpenURLNotification event payload with iOS (#755) (#2)
pull[bot] Apr 21, 2021
497aa72
Merge pull request #3 from microsoft/master
Saadnajmi Apr 28, 2021
1c81e5b
Merge pull request #4 from microsoft/master
Saadnajmi May 6, 2021
28aed35
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi May 20, 2021
62dc473
Merge branch 'master' of github.com:Saadnajmi/react-native-macos
Saadnajmi May 20, 2021
93c7296
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi May 21, 2021
780b2b7
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi Jun 11, 2021
99d5182
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi Aug 22, 2021
09e872d
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi Sep 3, 2021
9a25530
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi Oct 6, 2021
d82a01b
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi Oct 12, 2021
d9faa3a
[pull] master from microsoft:master (#11)
pull[bot] Oct 14, 2021
39bd488
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi Oct 21, 2021
c583ed3
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi Oct 25, 2021
9cea270
Merge branch 'master' of github.com:Saadnajmi/react-native-macos
Saadnajmi Nov 7, 2021
7571092
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi Nov 7, 2021
2153ef5
Merge branch 'master' of github.com:microsoft/react-native-macos
Saadnajmi Dec 8, 2021
4c72f33
Use NSSwitch
Saadnajmi Dec 9, 2021
fb507f1
remove change from my fork
Saadnajmi Dec 9, 2021
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/Views/RCTSwitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#if !TARGET_OS_OSX // TODO(macOS GH#774)
@interface RCTSwitch : UISwitch
#else // [TODO(macOS GH#774)
@interface RCTSwitch : NSButton
@interface RCTSwitch : NSSwitch
#endif // ]TODO(macOS GH#774)

#if !TARGET_OS_OSX // TODO(macOS GH#774)
Expand Down
15 changes: 0 additions & 15 deletions React/Views/RCTSwitch.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,10 @@

#import "RCTSwitch.h"

#if TARGET_OS_OSX // [TODO(macOS GH#774)
#import <QuartzCore/QuartzCore.h>
#endif // ]TODO(macOS GH#774)

#import "UIView+React.h"

@implementation RCTSwitch

#if TARGET_OS_OSX // [TODO(macOS GH#774)
- (instancetype)initWithFrame:(CGRect)frame
{
if ((self = [super initWithFrame:frame])) {
self.buttonType = NSButtonTypeSwitch;
self.title = @""; // default is "Button"
}
return self;
}
#endif

#if !TARGET_OS_OSX // TODO(macOS GH#774)
- (void)setOn:(BOOL)on animated:(BOOL)animated
{
Expand Down