feat: Add class to style rounded buttons
This commit is contained in:
@@ -101,6 +101,7 @@
|
||||
8CF66059214C566B009F4314 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CF66056214C566A009F4314 /* Reachability.m */; };
|
||||
8CFA6323219A2C610099EB0E /* Tsunami.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CFA6322219A2C610099EB0E /* Tsunami.m */; };
|
||||
C89115902FEA7A0A31514912 /* Pods_Earthquake_Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25A8BFFE29D46740E8A8A7A3 /* Pods_Earthquake_Network.framework */; };
|
||||
DC03BEAB250BC0A60084769B /* EQNRoundedButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC03BEAA250BC0A60084769B /* EQNRoundedButton.swift */; };
|
||||
DC08803F24F5A89000186D97 /* SettingEnableTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08803E24F5A89000186D97 /* SettingEnableTableViewCell.swift */; };
|
||||
DC08804124F5B41400186D97 /* SettingSliderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC08804024F5B41400186D97 /* SettingSliderTableViewCell.swift */; };
|
||||
DC0E551324F8063300D54270 /* SettingSegmentedTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC0E551224F8063300D54270 /* SettingSegmentedTableViewCell.swift */; };
|
||||
@@ -317,6 +318,7 @@
|
||||
8CFA6321219A2C610099EB0E /* Tsunami.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tsunami.h; sourceTree = "<group>"; };
|
||||
8CFA6322219A2C610099EB0E /* Tsunami.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tsunami.m; sourceTree = "<group>"; };
|
||||
C4FB0D7EEA34F8222369E1BB /* Pods-Earthquake Network.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Earthquake Network.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Earthquake Network/Pods-Earthquake Network.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
DC03BEAA250BC0A60084769B /* EQNRoundedButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EQNRoundedButton.swift; sourceTree = "<group>"; };
|
||||
DC08803E24F5A89000186D97 /* SettingEnableTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingEnableTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DC08804024F5B41400186D97 /* SettingSliderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingSliderTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DC0E551224F8063300D54270 /* SettingSegmentedTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingSegmentedTableViewCell.swift; sourceTree = "<group>"; };
|
||||
@@ -732,6 +734,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DCC23DEE24D28F58003A2404 /* EQNEdgeInsetLabel.swift */,
|
||||
DC03BEAA250BC0A60084769B /* EQNRoundedButton.swift */,
|
||||
DC52B8A424FCCD6900ABEBA6 /* AppTheme.swift */,
|
||||
);
|
||||
path = UI;
|
||||
@@ -1081,6 +1084,7 @@
|
||||
DCBB267E24D1EA2000F04559 /* SubscriptionProductTableViewCell.swift in Sources */,
|
||||
8CFA6323219A2C610099EB0E /* Tsunami.m in Sources */,
|
||||
DC99A50524E66E430071BC9F /* EQNAppearanceCommand.swift in Sources */,
|
||||
DC03BEAB250BC0A60084769B /* EQNRoundedButton.swift in Sources */,
|
||||
8CCE164E21E7BACE00173CD9 /* EQNNotificheSegnalazioniUtente.m in Sources */,
|
||||
DCD4571C24F6CF0D00B58304 /* EQNGenericValue.swift in Sources */,
|
||||
8C4E343F215012FA008B0D2A /* EQNManager.m in Sources */,
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// EQNRoundedButton.swift
|
||||
// Earthquake Network
|
||||
//
|
||||
// Created by Busi Andrea on 11/09/2020.
|
||||
// Copyright © 2020 Earthquake Network. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class EQNRoundedButton: UIButton {
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
super.init(coder: coder)
|
||||
setupUI()
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func setupUI() {
|
||||
backgroundColor = .white
|
||||
layer.masksToBounds = true
|
||||
layer.borderWidth = AppTheme.shared.borderWidth
|
||||
layer.borderColor = AppTheme.Colors.darkGray.cgColor
|
||||
layer.cornerRadius = AppTheme.shared.borderCornerRadius
|
||||
|
||||
setTitle(titleLabel?.text?.uppercased(), for: .normal)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user