Mark classes as final when they can be, to communicate intent (don’t subclass these). Fix #4751.

This commit is contained in:
Brent Simmons committed 2025-09-16 10:21:29 -07:00
1 parent c6585994fb
commit 4b7ea6d920
170 files changed
+188 -188

No files matched your search

@@ -8,7 +8,7 @@
import UIKit
class CroppingPreviewParameters: UIPreviewParameters {
final class CroppingPreviewParameters: UIPreviewParameters {
override init() {
super.init()
+1 -1
View File
@@ -8,7 +8,7 @@
import UIKit
class ImageHeaderView: UITableViewHeaderFooterView {
final class ImageHeaderView: UITableViewHeaderFooterView {
static let rowHeight = CGFloat(integerLiteral: 88)
+1 -1
View File
@@ -9,7 +9,7 @@
import UIKit
@IBDesignable
class InteractiveLabel: UILabel, UIEditMenuInteractionDelegate {
final class InteractiveLabel: UILabel, UIEditMenuInteractionDelegate {
override init(frame: CGRect) {
super.init(frame: frame)
@@ -8,7 +8,7 @@
import UIKit
class ModalNavigationController: UINavigationController {
final class ModalNavigationController: UINavigationController {
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
@@ -10,7 +10,7 @@ import Foundation
import UIKit
class NonIntrinsicButton: UIButton {
final class NonIntrinsicButton: UIButton {
// Prevent autolayout from messing around with our frame settings
override var intrinsicContentSize: CGSize {
@@ -8,7 +8,7 @@
import UIKit
class NonIntrinsicImageView: UIImageView {
final class NonIntrinsicImageView: UIImageView {
// Prevent autolayout from messing around with our frame settings
override var intrinsicContentSize: CGSize {
+1 -1
View File
@@ -8,7 +8,7 @@
import UIKit
class NonIntrinsicLabel: UILabel {
final class NonIntrinsicLabel: UILabel {
// Prevent autolayout from messing around with our frame settings
override var intrinsicContentSize: CGSize {
@@ -8,7 +8,7 @@
import UIKit
class RoundedProgressView: UIProgressView {
final class RoundedProgressView: UIProgressView {
override func layoutSubviews() {
super.layoutSubviews()
+1 -1
View File
@@ -8,7 +8,7 @@
import UIKit
class TickMarkSlider: UISlider {
final class TickMarkSlider: UISlider {
private var enableFeedback = false
private let feedbackGenerator = UISelectionFeedbackGenerator()
+1 -1
View File
@@ -8,7 +8,7 @@
import UIKit
class VibrantButton: UIButton {
final class VibrantButton: UIButton {
@IBInspectable var backgroundHighlightColor: UIColor = AppAssets.secondaryAccentColor
+1 -1
View File
@@ -8,7 +8,7 @@
import UIKit
class VibrantLabel: UILabel {
final class VibrantLabel: UILabel {
override init(frame: CGRect) {
super.init(frame: frame)