hmhv / SoftUIView

SoftUIView is a Soft-UI (Neumorphism) view written in Swift.
https://uxdesign.cc/neumorphism-in-user-interfaces-b47cef3bf3a6
MIT License
64 stars 6 forks source link

How to support it in Objective-c #2

Open amar90bhanwaria opened 3 years ago

amar90bhanwaria commented 3 years ago

Hi, is there any way to use this in Objective c existing project.

hmhv commented 3 years ago
#import <SoftUIView/SoftUIView-Swift.h>

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    SoftUIView *softUIView = [[SoftUIView alloc] initWithFrame:CGRectMake(100, 100, 200, 200)];
    [self.view addSubview:softUIView];
}

@end
amar90bhanwaria commented 3 years ago

Hi, Thanks for replying , but I am talking about all public function access and overwrite all properity... , I tried it all work ok but , setContentView getting error when I make it @objc

hmhv commented 3 years ago

Thank you. I fixed for objc. plaese check version 0.0.3.

amar90bhanwaria commented 3 years ago

Hi , Alright will check, thanks you .

amar90bhanwaria commented 3 years ago

Hi, is there any options to create frame like https://github.com/Borutsky/neumorphism-android this "flat|pressed|basin "... that basin state of view can be made by updating this existing code ?

hmhv commented 3 years ago

"flat|pressed" is possible with SoftUIViewType. for more state, you can fix source code.