Skip to content

Instantly share code, notes, and snippets.

@nhatduong
nhatduong / Border in TableView Sections
Created June 14, 2022 11:19 — forked from micheltlutz/Border in TableView Sections
Apply border around tableView Sections
/**
Extension for UITableViewController or UIViewController as you prefer
*/
extension UITableViewController {
func colorSection(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
let cornerRadius: CGFloat = 0.0
cell.backgroundColor = UIColor.clear
let layer: CAShapeLayer = CAShapeLayer()
let pathRef: CGMutablePath = CGMutablePath()
//dx leading an trailing margins
@nhatduong
nhatduong / README.md
Created October 10, 2021 04:57 — forked from tomas789/README.md
OpenCV <-> Objective-C++ (UIImage) conversion

OpenCV -> UIImage

cv::Mat mat /* = ... */;
UIImage* image = [UIImage fromCvMat:mat];

UIImage -> OpenCV

@nhatduong
nhatduong / README.md
Created July 20, 2021 07:53 — forked from boopathi/README.md
Creating a Swift-ReactNative project

Settings

  1. Create a project in XCode with the default settings
    • iOS > Application > Single View Application
    • Language: Swift
  2. Under project General settings, add ReactKit to Linked Framework and Libraries
    • + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
  3. Now ReactKit would have been imported. Link it by choosing it from the list.
    • + > lib.ReactKit.a
  4. Under project Build Settings,