Files
Woka_Native_iOS/WOKA/Helpers/SwipeTableViewFont.swift

36 lines
1.1 KiB
Swift
Raw Normal View History

//
// SwipeTableViewFont.swift
// WOKA
//
// Created by MacBook Pro on 23/07/24.
//
import UIKit
extension UITableView{
func swipeGestureFont(font : UIFont){
if #available(iOS 13.0, *) {
for subview in self.subviews {
if NSStringFromClass(type(of: subview)) == "_UITableViewCellSwipeContainerView" {
for swipeContainerSubview in subview.subviews {
if NSStringFromClass(type(of: swipeContainerSubview)) == "UISwipeActionPullView" {
for case let button as UIButton in swipeContainerSubview.subviews {
button.titleLabel?.font = font
}
}
}
}
}
} else {
for subview in self.subviews {
if NSStringFromClass(type(of: subview)) == "UISwipeActionPullView" {
for case let button as UIButton in subview.subviews {
button.titleLabel?.font = font
}
}
}
}
}
}