How I can convert this Objective-C format into Swift? I already create a bridging header called Bridging-Header.h
.
I already import this library header into bridging header.
#import "DraggableView.h"
#import "DraggableViewBackground.h"
#import "OverlayView.h"
Then I want to convert this Objective-C thing into swift.
DraggableViewBackground *draggableBackground = [[DraggableViewBackground alloc]initWithFrame:self.view.frame];
[self.view addSubview:draggableBackground];
What I already done so far, I call the object DraggableViewBackground
from DraggableViewBackground.h
in my ViewController.swift
.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
var instanceOfDraggableViewBackground: DraggableViewBackground = DraggableViewBackground()
}
}
Reference library: https://github.com/cwRichardKim/TinderSimpleSwipeCards