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
let panGesture = UIPanGestureRecognizer(target: self, action: #selector(handleGesture))
btn_pull_push_view.addGestureRecognizer(panGesture)
headerGoogleMap.addGestureRecognizer(panGesture)
protocol GoogleMapControlDelegate {
func swipeView(vl: CGFloat, doneEvent: @escaping (_ response : CGFloat)->())
func swipeViewState(state: String, vl: CGFloat, doneEvent: @escaping (_ response : CGFloat,_ clearData: Bool)->())
import Foundation
import UIKit
class BouncesContentView: BasicContentView {
public var duration = 0.3
override init(frame: CGRect) {
super.init(frame: frame)
}
import UIKit
import ESTabBarController_swift
class StartApp: UIViewController {
static let shared = StartApp()
override func viewDidLoad() {
super.viewDidLoad()
setupTabbarApp(setTab: false, viewVC: Browser(), indexTab: 1)
import Foundation
import UIKit
import AVFoundation
struct appVar {
static let appDelegate = UIApplication.shared.delegate as! AppDelegate
static let UIwidth = UIScreen.main.bounds.size.width
static let UIheight = UIScreen.main.bounds.size.height
static let lang: String = Locale.current.languageCode!
import Foundation
import UIKit
import UserNotifications
import Firebase
import FirebaseMessaging
extension AppDelegate: UNUserNotificationCenterDelegate {
func userNotificationCenter(
_ center: UNUserNotificationCenter,
willPresent notification: UNNotification,
import UserNotifications
import Firebase
import FirebaseMessaging
extension AppDelegate: MessagingDelegate {
func messaging(
_ messaging: Messaging,
didReceiveRegistrationToken fcmToken: String?
) {
import UIKit
import SwiftEntryKit
extension AppDelegate {
func startApp() {
print(UserModel.getUserInfo().user_oid)
let window = UIWindow(frame: UIScreen.main.bounds)
import UIKit
import GoogleMaps
import FBSDKCoreKit
import FBSDKLoginKit
import UserNotifications
import Firebase
import FirebaseMessaging
import GoogleSignIn
//import TwitterKit
//import SwifteriOS
import Foundation
import SwiftyJSON
struct PostDataCommentsModel {
let comment_oid: String
let content: String
let user: UserPostModel
let media: [PostMediaModel]