forked from organicmaps/organicmaps
[ios] add CornerRadius enum for easily setting up the property
1. new typed corner radius 2. updated styles where the corner radius is used Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
parent
2ebf6a5397
commit
d0d84a5dd5
23 changed files with 81 additions and 129 deletions
|
@ -1,12 +1,18 @@
|
|||
extension CALayer {
|
||||
func setCorner(radius: CGFloat,
|
||||
corners: CACornerMask? = nil) {
|
||||
cornerRadius = radius
|
||||
if let corners {
|
||||
maskedCorners = corners
|
||||
func setCornerRadius(_ cornerRadius: CornerRadius,
|
||||
maskedCorners: CACornerMask? = nil) {
|
||||
self.cornerRadius = cornerRadius.value
|
||||
if let maskedCorners {
|
||||
self.maskedCorners = maskedCorners
|
||||
}
|
||||
if #available(iOS 13.0, *) {
|
||||
cornerCurve = .continuous
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension CACornerMask {
|
||||
static var all: CACornerMask {
|
||||
return [.layerMinXMinYCorner, .layerMaxXMinYCorner, .layerMinXMaxYCorner, .layerMaxXMaxYCorner]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ extension UIView {
|
|||
snapshot.layer.contents = contents
|
||||
snapshot.layer.bounds = layer.bounds
|
||||
}
|
||||
snapshot.layer.setCorner(radius: layer.cornerRadius)
|
||||
snapshot.layer.setCornerRadius(.custom(layer.cornerRadius))
|
||||
snapshot.layer.masksToBounds = layer.masksToBounds
|
||||
snapshot.contentMode = contentMode
|
||||
snapshot.transform = transform
|
||||
|
|
|
@ -8,7 +8,7 @@ final class AlertPresentationController: DimmedModalPresentationController {
|
|||
|
||||
override func presentationTransitionWillBegin() {
|
||||
super.presentationTransitionWillBegin()
|
||||
presentedViewController.view.layer.setCorner(radius: 12)
|
||||
presentedViewController.view.layer.setCornerRadius(.modalSheet)
|
||||
presentedViewController.view.clipsToBounds = true
|
||||
guard let containerView = containerView, let presentedView = presentedView else { return }
|
||||
containerView.addSubview(presentedView)
|
||||
|
|
|
@ -17,7 +17,7 @@ override var frameOfPresentedViewInContainerView: CGRect {
|
|||
|
||||
override func presentationTransitionWillBegin() {
|
||||
super.presentationTransitionWillBegin()
|
||||
presentedViewController.view.layer.setCorner(radius: 8)
|
||||
presentedViewController.view.layer.setCornerRadius(.buttonDefault)
|
||||
presentedViewController.view.clipsToBounds = true
|
||||
guard let containerView = containerView, let presentedView = presentedView else { return }
|
||||
containerView.addSubview(presentedView)
|
||||
|
|
|
@ -16,7 +16,7 @@ final class PromoBookingPresentationController: DimmedModalPresentationControlle
|
|||
|
||||
override func presentationTransitionWillBegin() {
|
||||
super.presentationTransitionWillBegin()
|
||||
presentedViewController.view.layer.setCorner(radius: 8)
|
||||
presentedViewController.view.layer.setCornerRadius(.buttonDefault)
|
||||
presentedViewController.view.clipsToBounds = true
|
||||
guard let containerView = containerView, let presentedView = presentedView else { return }
|
||||
containerView.addSubview(presentedView)
|
||||
|
|
|
@ -22,7 +22,7 @@ final class Toast: NSObject {
|
|||
}
|
||||
|
||||
private init(_ text: String) {
|
||||
blurView.layer.setCorner(radius: 8)
|
||||
blurView.layer.setCornerRadius(.buttonDefault)
|
||||
blurView.clipsToBounds = true
|
||||
blurView.alpha = 0
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
final class TransportRuler: TransportTransitCell {
|
||||
enum Config {
|
||||
static let backgroundCornerRadius: CGFloat = 4
|
||||
static var backgroundColor: UIColor { return UIColor.blackOpaque() }
|
||||
static var imageColor: UIColor { return UIColor.blackSecondaryText() }
|
||||
static var labelTextColor: UIColor { return .black }
|
||||
|
@ -10,7 +9,7 @@ final class TransportRuler: TransportTransitCell {
|
|||
|
||||
@IBOutlet private weak var background: UIView! {
|
||||
didSet {
|
||||
background.layer.setCorner(radius: Config.backgroundCornerRadius)
|
||||
background.layer.setCornerRadius(.buttonSmall)
|
||||
background.backgroundColor = Config.backgroundColor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
final class TransportTransitPedestrian: TransportTransitCell {
|
||||
enum Config {
|
||||
static let backgroundCornerRadius: CGFloat = 4
|
||||
static var backgroundColor: UIColor { return UIColor.blackOpaque() }
|
||||
static var imageColor: UIColor { return UIColor.blackSecondaryText() }
|
||||
}
|
||||
|
||||
@IBOutlet private weak var background: UIView! {
|
||||
didSet {
|
||||
background.layer.setCorner(radius: Config.backgroundCornerRadius)
|
||||
background.layer.setCornerRadius(.buttonSmall)
|
||||
background.backgroundColor = Config.backgroundColor
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet private weak var image: UIImageView! {
|
||||
didSet {
|
||||
image.image = #imageLiteral(resourceName: "ic_walk")
|
||||
image.image = UIImage(resource: .icWalk)
|
||||
image.tintColor = Config.imageColor
|
||||
image.contentMode = .scaleAspectFit
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
final class TransportTransitTrain: TransportTransitCell {
|
||||
enum Config {
|
||||
static let backgroundCornerRadius: CGFloat = 4
|
||||
static var labelTextColor: UIColor { return .white }
|
||||
static let labelTextFont = UIFont.bold12()
|
||||
static let labelTrailing: CGFloat = 4
|
||||
|
@ -8,7 +7,7 @@ final class TransportTransitTrain: TransportTransitCell {
|
|||
|
||||
@IBOutlet private weak var background: UIView! {
|
||||
didSet {
|
||||
background.layer.setCorner(radius: Config.backgroundCornerRadius)
|
||||
background.layer.setCornerRadius(.buttonSmall)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -116,8 +116,8 @@ extension Style {
|
|||
set { params[.borderWidth] = newValue }
|
||||
}
|
||||
|
||||
var cornerRadius: CGFloat? {
|
||||
get { return self[.cornerRadius] as? CGFloat }
|
||||
var cornerRadius: CornerRadius? {
|
||||
get { return self[.cornerRadius] as? CornerRadius }
|
||||
set { params[.cornerRadius] = newValue }
|
||||
}
|
||||
|
||||
|
|
21
iphone/Maps/Core/Theme/CornerRadius.swift
Normal file
21
iphone/Maps/Core/Theme/CornerRadius.swift
Normal file
|
@ -0,0 +1,21 @@
|
|||
enum CornerRadius {
|
||||
case modalSheet
|
||||
case buttonDefault
|
||||
case buttonDefaultSmall
|
||||
case buttonSmall
|
||||
case grabber
|
||||
case custom(CGFloat)
|
||||
}
|
||||
|
||||
extension CornerRadius {
|
||||
var value: CGFloat {
|
||||
switch self {
|
||||
case .modalSheet: return 12
|
||||
case .buttonDefault: return 8
|
||||
case .buttonDefaultSmall: return 6
|
||||
case .buttonSmall: return 4
|
||||
case .grabber: return 2.5
|
||||
case .custom(let value): return value
|
||||
}
|
||||
}
|
||||
}
|
|
@ -59,6 +59,7 @@ enum GlobalStyleSheet: String, CaseIterable {
|
|||
case white = "MWMWhite"
|
||||
case datePickerView = "DatePickerView"
|
||||
case valueStepperView = "ValueStepperView"
|
||||
case grabber
|
||||
case modalSheetBackground
|
||||
case modalSheetContent
|
||||
}
|
||||
|
@ -178,7 +179,7 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
s.backgroundColor = colors.tabBarButtonBackground
|
||||
s.tintColor = colors.blackSecondaryText
|
||||
s.coloring = MWMButtonColoring.black
|
||||
s.cornerRadius = 8
|
||||
s.cornerRadius = .buttonDefault
|
||||
s.shadowColor = UIColor(0,0,0,alpha20)
|
||||
s.shadowOpacity = 1
|
||||
s.shadowOffset = CGSize(width: 0, height: 1)
|
||||
|
@ -186,7 +187,7 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
}
|
||||
case .trackRecordingWidgetButton:
|
||||
return .addFrom(Self.bottomTabBarButton) { s in
|
||||
s.cornerRadius = 23
|
||||
s.cornerRadius = .custom(23)
|
||||
}
|
||||
case .blackOpaqueBackground:
|
||||
return .add { s in
|
||||
|
@ -234,7 +235,7 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
}
|
||||
case .dialogView:
|
||||
return .add { s in
|
||||
s.cornerRadius = 8
|
||||
s.cornerRadius = .buttonDefault
|
||||
s.shadowRadius = 2
|
||||
s.shadowColor = UIColor(0,0,0,alpha26)
|
||||
s.shadowOpacity = 1
|
||||
|
@ -244,7 +245,7 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
}
|
||||
case .alertView:
|
||||
return .add { s in
|
||||
s.cornerRadius = 12
|
||||
s.cornerRadius = .modalSheet
|
||||
s.shadowRadius = 6
|
||||
s.shadowColor = UIColor(0,0,0,alpha20)
|
||||
s.shadowOpacity = 1
|
||||
|
@ -275,7 +276,7 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
case .flatNormalButton:
|
||||
return .add { s in
|
||||
s.font = fonts.medium14
|
||||
s.cornerRadius = 8
|
||||
s.cornerRadius = .buttonDefault
|
||||
s.clip = true
|
||||
s.fontColor = colors.whitePrimaryText
|
||||
s.backgroundColor = colors.linkBlue
|
||||
|
@ -290,7 +291,7 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
case .flatNormalTransButton:
|
||||
return .add { s in
|
||||
s.font = fonts.medium14
|
||||
s.cornerRadius = 8
|
||||
s.cornerRadius = .buttonDefault
|
||||
s.clip = true
|
||||
s.fontColor = colors.linkBlue
|
||||
s.backgroundColor = colors.clear
|
||||
|
@ -332,7 +333,7 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
case .flatRedButton:
|
||||
return .add { s in
|
||||
s.font = fonts.medium14
|
||||
s.cornerRadius = 8
|
||||
s.cornerRadius = .buttonDefault
|
||||
s.fontColor = colors.whitePrimaryText
|
||||
s.backgroundColor = colors.buttonRed
|
||||
s.fontColorHighlighted = colors.buttonRedHighlighted
|
||||
|
@ -348,7 +349,7 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
return .add { s in
|
||||
s.font = fonts.regular14
|
||||
s.fontColor = colors.linkBlue
|
||||
s.cornerRadius = 8
|
||||
s.cornerRadius = .buttonDefault
|
||||
s.borderColor = colors.linkBlue
|
||||
s.borderWidth = 1
|
||||
s.fontColorHighlighted = colors.linkBlueHighlighted
|
||||
|
@ -360,7 +361,7 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
s.fontColor = colors.linkBlue
|
||||
s.fontColorHighlighted = colors.white
|
||||
s.borderColor = colors.linkBlue
|
||||
s.cornerRadius = 8
|
||||
s.cornerRadius = .buttonDefault
|
||||
s.borderWidth = 1
|
||||
s.backgroundColor = colors.clear
|
||||
s.backgroundColorHighlighted = colors.linkBlue
|
||||
|
@ -431,14 +432,18 @@ extension GlobalStyleSheet: IStyleSheet {
|
|||
s.fontColor = colors.blackPrimaryText
|
||||
s.coloring = MWMButtonColoring.blue
|
||||
}
|
||||
case .grabber:
|
||||
return .addFrom(Self.pressBackground) { s in
|
||||
s.cornerRadius = .grabber
|
||||
}
|
||||
case .modalSheetBackground:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.white
|
||||
s.shadowColor = UIColor.black
|
||||
s.shadowOffset = CGSize(width: 0, height: 1)
|
||||
s.shadowOpacity = 0.4
|
||||
s.shadowOpacity = 0.3
|
||||
s.shadowRadius = 6
|
||||
s.cornerRadius = 12
|
||||
s.cornerRadius = .modalSheet
|
||||
s.clip = false
|
||||
s.maskedCorners = isIPad ? [] : [.layerMinXMinYCorner, .layerMaxXMinYCorner]
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ extension MapStyleSheet: IStyleSheet {
|
|||
s.backgroundColor = colors.clear
|
||||
s.borderColor = colors.clear
|
||||
s.borderWidth = 0
|
||||
s.cornerRadius = 6
|
||||
s.cornerRadius = .buttonDefaultSmall
|
||||
}
|
||||
case .mapMenuButtonEnabled:
|
||||
return .add { s in
|
||||
|
@ -37,7 +37,7 @@ extension MapStyleSheet: IStyleSheet {
|
|||
s.backgroundColor = colors.linkBlue
|
||||
s.borderColor = colors.linkBlue
|
||||
s.borderWidth = 2
|
||||
s.cornerRadius = 6
|
||||
s.cornerRadius = .buttonDefaultSmall
|
||||
}
|
||||
case .mapStreetNameBackgroundView:
|
||||
return .add { s in
|
||||
|
@ -90,7 +90,7 @@ extension MapStyleSheet: IStyleSheet {
|
|||
case .mapFirstTurnView:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.linkBlue
|
||||
s.cornerRadius = 4
|
||||
s.cornerRadius = .buttonSmall
|
||||
s.shadowRadius = 2
|
||||
s.shadowColor = colors.blackHintText
|
||||
s.shadowOpacity = 1
|
||||
|
@ -104,7 +104,7 @@ extension MapStyleSheet: IStyleSheet {
|
|||
return .add { s in
|
||||
s.shadowOffset = CGSize(width: 0, height: 3)
|
||||
s.shadowRadius = 6
|
||||
s.cornerRadius = 4
|
||||
s.cornerRadius = .buttonSmall
|
||||
s.shadowOpacity = 1
|
||||
s.backgroundColor = colors.white
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ extension PlacePageStyleSheet: IStyleSheet {
|
|||
case .ppTitlePopularView:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.linkBlueHighlighted
|
||||
s.cornerRadius = 10
|
||||
s.cornerRadius = .custom(10)
|
||||
}
|
||||
case .ppActionBarTitle:
|
||||
return .add { s in
|
||||
|
@ -45,7 +45,7 @@ extension PlacePageStyleSheet: IStyleSheet {
|
|||
case .ppElevationProfileDescriptionCell:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.blackOpaque
|
||||
s.cornerRadius = 6
|
||||
s.cornerRadius = .buttonDefault
|
||||
}
|
||||
case .ppElevationProfileExtendedDifficulty:
|
||||
return .add { s in
|
||||
|
@ -110,7 +110,7 @@ extension PlacePageStyleSheet: IStyleSheet {
|
|||
case .ppHeaderView:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.white
|
||||
s.cornerRadius = 10
|
||||
s.cornerRadius = .modalSheet
|
||||
s.clip = true
|
||||
}
|
||||
case .ppNavigationShadowView:
|
||||
|
@ -123,19 +123,15 @@ extension PlacePageStyleSheet: IStyleSheet {
|
|||
s.clip = false
|
||||
}
|
||||
case .ppBackgroundView:
|
||||
return .add { s in
|
||||
return .addFrom(GlobalStyleSheet.modalSheetBackground) { s in
|
||||
s.backgroundColor = colors.pressBackground
|
||||
s.cornerRadius = 10
|
||||
s.shadowColor = UIColor.black
|
||||
s.shadowOffset = CGSize(width: 0, height: 1)
|
||||
s.shadowOpacity = 0.6
|
||||
s.shadowRadius = 2
|
||||
s.maskedCorners = isIPad ? CACornerMask.all : [.layerMinXMinYCorner, .layerMaxXMinYCorner]
|
||||
s.clip = false
|
||||
}
|
||||
case .ppView:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.clear
|
||||
s.cornerRadius = 10
|
||||
s.cornerRadius = .modalSheet
|
||||
s.clip = true
|
||||
}
|
||||
case .ppHeaderCircleIcon:
|
||||
|
|
|
@ -31,7 +31,7 @@ class UISearchBarRenderer: UIViewRenderer {
|
|||
} else {
|
||||
control.setSearchFieldBackgroundImage(UIImage(), for: .normal)
|
||||
}
|
||||
searchTextField.layer.setCorner(radius: 8)
|
||||
searchTextField.layer.setCornerRadius(.buttonDefault)
|
||||
searchTextField.layer.masksToBounds = true
|
||||
// Placeholder color
|
||||
if let placeholder = searchTextField.placeholder {
|
||||
|
|
|
@ -20,7 +20,7 @@ extension UITextField {
|
|||
class UITextFieldRenderer {
|
||||
class func render(_ control: UITextField, style: Style) {
|
||||
if let cornerRadius = style.cornerRadius {
|
||||
control.layer.setCorner(radius: cornerRadius)
|
||||
control.layer.setCornerRadius(cornerRadius)
|
||||
control.clipsToBounds = true
|
||||
}
|
||||
control.borderStyle = .none
|
||||
|
|
|
@ -46,7 +46,7 @@ class UIViewRenderer {
|
|||
control.layer.borderWidth = borderWidth
|
||||
}
|
||||
if let cornerRadius = style.cornerRadius {
|
||||
control.layer.cornerRadius = cornerRadius
|
||||
control.layer.cornerRadius = cornerRadius.value
|
||||
}
|
||||
if let maskedCorners = style.maskedCorners {
|
||||
control.layer.maskedCorners = maskedCorners
|
||||
|
|
|
@ -1,97 +1,21 @@
|
|||
enum SearchStyleSheet: String, CaseIterable {
|
||||
case searchCancelButton
|
||||
case searchInstallButton = "SearchInstallButton"
|
||||
case searchBanner = "SearchBanner"
|
||||
case searchClosedBackground = "SearchClosedBackground"
|
||||
case searchPopularView = "SearchPopularView"
|
||||
case searchSideAvailableMarker = "SearchSideAvaliableMarker"
|
||||
case searchBarView = "SearchBarView"
|
||||
case searchActionBarView = "SearchActionBarView"
|
||||
case searchActionBarButton = "SearchActionBarButton"
|
||||
case searchSearchTextField = "SearchSearchTextField"
|
||||
case searchSearchTextFieldIcon = "SearchSearchTextFieldIcon"
|
||||
case searchDatePickerField = "SearchDatePickerField"
|
||||
case searchCellAvailable = "SearchCellAvaliable"
|
||||
}
|
||||
|
||||
extension SearchStyleSheet: IStyleSheet {
|
||||
func styleResolverFor(colors: IColors, fonts: IFonts) -> Theme.StyleResolver {
|
||||
switch self {
|
||||
case .searchInstallButton:
|
||||
return .add { s in
|
||||
s.cornerRadius = 10
|
||||
s.clip = true
|
||||
s.font = fonts.medium12
|
||||
s.fontColor = colors.blackSecondaryText
|
||||
s.backgroundColor = colors.searchPromoBackground
|
||||
}
|
||||
case .searchBanner:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.searchPromoBackground
|
||||
}
|
||||
case .searchClosedBackground:
|
||||
return .add { s in
|
||||
s.cornerRadius = 4
|
||||
s.backgroundColor = colors.blackHintText
|
||||
}
|
||||
case .searchPopularView:
|
||||
return .add { s in
|
||||
s.cornerRadius = 10
|
||||
s.cornerRadius = .custom(10)
|
||||
s.backgroundColor = colors.linkBlueHighlighted
|
||||
}
|
||||
case .searchSideAvailableMarker:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.ratingGreen
|
||||
}
|
||||
case .searchBarView:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.primary
|
||||
s.shadowRadius = 2
|
||||
s.shadowColor = UIColor(0, 0, 0, alpha26)
|
||||
s.shadowOpacity = 1
|
||||
s.shadowOffset = CGSize.zero
|
||||
}
|
||||
case .searchActionBarView:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.linkBlue
|
||||
s.cornerRadius = 20
|
||||
s.shadowRadius = 1
|
||||
s.shadowColor = UIColor(0, 0, 0, 0.24)
|
||||
s.shadowOffset = CGSize(width: 0, height: 2)
|
||||
s.shadowOpacity = 1
|
||||
}
|
||||
case .searchActionBarButton:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.clear
|
||||
s.fontColor = colors.whitePrimaryText
|
||||
s.font = fonts.semibold14
|
||||
s.coloring = .whiteText
|
||||
}
|
||||
case .searchSearchTextField:
|
||||
return .add { s in
|
||||
s.fontColor = colors.blackPrimaryText
|
||||
s.backgroundColor = colors.white
|
||||
s.tintColor = colors.blackSecondaryText
|
||||
s.cornerRadius = 8.0
|
||||
s.barTintColor = colors.primary
|
||||
}
|
||||
case .searchSearchTextFieldIcon:
|
||||
return .add { s in
|
||||
s.tintColor = colors.blackSecondaryText
|
||||
s.coloring = MWMButtonColoring.black
|
||||
s.color = colors.blackSecondaryText
|
||||
}
|
||||
case .searchDatePickerField:
|
||||
return .add { s in
|
||||
s.backgroundColor = colors.white
|
||||
s.cornerRadius = 4
|
||||
s.borderColor = colors.solidDividers
|
||||
s.borderWidth = 1
|
||||
}
|
||||
case .searchCellAvailable:
|
||||
return .addFrom(GlobalStyleSheet.tableCell) { s in
|
||||
s.backgroundColor = colors.transparentGreen
|
||||
}
|
||||
case .searchCancelButton:
|
||||
return .add { s in
|
||||
s.fontColor = colors.whitePrimaryText
|
||||
|
|
|
@ -522,6 +522,7 @@
|
|||
ED9966802B94FBC20083CE55 /* ColorPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED99667D2B94FBC20083CE55 /* ColorPicker.swift */; };
|
||||
EDA1EAA42CC7ECAD00DBDCAA /* ElevationProfileFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDA1EAA32CC7ECAD00DBDCAA /* ElevationProfileFormatter.swift */; };
|
||||
EDB71D5C2D82B4F8004A6A7F /* SearchOnMapPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDB71D5B2D82B4F8004A6A7F /* SearchOnMapPresentationController.swift */; };
|
||||
EDB71D8C2D8474A0004A6A7F /* CornerRadius.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDB71D8B2D8474A0004A6A7F /* CornerRadius.swift */; };
|
||||
EDBD68072B625724005DD151 /* LocationServicesDisabledAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = EDBD68062B625724005DD151 /* LocationServicesDisabledAlert.xib */; };
|
||||
EDBD680B2B62572E005DD151 /* LocationServicesDisabledAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDBD680A2B62572E005DD151 /* LocationServicesDisabledAlert.swift */; };
|
||||
EDC3573B2B7B5029001AE9CA /* CALayer+SetCorner.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDC3573A2B7B5029001AE9CA /* CALayer+SetCorner.swift */; };
|
||||
|
@ -1540,6 +1541,7 @@
|
|||
ED99667D2B94FBC20083CE55 /* ColorPicker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorPicker.swift; sourceTree = "<group>"; };
|
||||
EDA1EAA32CC7ECAD00DBDCAA /* ElevationProfileFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElevationProfileFormatter.swift; sourceTree = "<group>"; };
|
||||
EDB71D5B2D82B4F8004A6A7F /* SearchOnMapPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchOnMapPresentationController.swift; sourceTree = "<group>"; };
|
||||
EDB71D8B2D8474A0004A6A7F /* CornerRadius.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CornerRadius.swift; sourceTree = "<group>"; };
|
||||
EDBD68062B625724005DD151 /* LocationServicesDisabledAlert.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LocationServicesDisabledAlert.xib; sourceTree = "<group>"; };
|
||||
EDBD680A2B62572E005DD151 /* LocationServicesDisabledAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationServicesDisabledAlert.swift; sourceTree = "<group>"; };
|
||||
EDC3573A2B7B5029001AE9CA /* CALayer+SetCorner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CALayer+SetCorner.swift"; sourceTree = "<group>"; };
|
||||
|
@ -3000,6 +3002,7 @@
|
|||
993DF0CE23F6BDB000AC231A /* MainTheme.swift */,
|
||||
ED914AB72D351DF000973C45 /* StyleApplicable.swift */,
|
||||
EDCA7CDE2D317DF9003366CE /* StyleSheet.swift */,
|
||||
EDB71D8B2D8474A0004A6A7F /* CornerRadius.swift */,
|
||||
993DF10123F6BDB100AC231A /* GlobalStyleSheet.swift */,
|
||||
99A906F223FA95AB0005872B /* PlacePageStyleSheet.swift */,
|
||||
99F8B4C523B644A6009FF0B4 /* MapStyleSheet.swift */,
|
||||
|
@ -4718,6 +4721,7 @@
|
|||
34D3AFEA1E378AF1004100F9 /* UINib+Init.swift in Sources */,
|
||||
34AB663E1FC5AA330078E451 /* RouteManagerTransitioning.swift in Sources */,
|
||||
993DF0CB23F6BD0600AC231A /* ElevationDetailsRouter.swift in Sources */,
|
||||
EDB71D8C2D8474A0004A6A7F /* CornerRadius.swift in Sources */,
|
||||
47CA68FC250F99E500671019 /* BookmarksListCellStrategy.swift in Sources */,
|
||||
34AB662F1FC5AA330078E451 /* RouteManagerPresentationController.swift in Sources */,
|
||||
993F5508237C622700545511 /* DeepLinkRouteStrategyAdapter.mm in Sources */,
|
||||
|
|
|
@ -25,7 +25,7 @@ class BottomMenuViewController: MWMViewController {
|
|||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
tableView.layer.setCorner(radius: 8, corners: [.layerMinXMinYCorner, .layerMaxXMinYCorner])
|
||||
tableView.layer.setCornerRadius(.buttonDefault, maskedCorners: [.layerMinXMinYCorner, .layerMaxXMinYCorner])
|
||||
tableView.sectionFooterHeight = 0
|
||||
|
||||
tableView.dataSource = presenter
|
||||
|
|
|
@ -22,7 +22,7 @@ final class ProductButton: UIButton {
|
|||
titleLabel?.allowsDefaultTighteningForTruncation = true
|
||||
titleLabel?.adjustsFontSizeToFitWidth = true
|
||||
titleLabel?.minimumScaleFactor = 0.5
|
||||
layer.setCorner(radius: 5.0)
|
||||
layer.setCornerRadius(.buttonDefaultSmall)
|
||||
layer.masksToBounds = true
|
||||
addTarget(self, action: #selector(buttonDidTap), for: .touchUpInside)
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class DifficultyView: UIView {
|
|||
for _ in 0..<difficultyLevelCount {
|
||||
let view = UIView()
|
||||
stackView.addArrangedSubview(view)
|
||||
view.layer.setCorner(radius: bulletSize.height / 2)
|
||||
view.layer.setCornerRadius(.custom(bulletSize.height / 2))
|
||||
views.append(view)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,8 +41,7 @@ final class SearchOnMapHeaderView: UIView {
|
|||
}
|
||||
|
||||
private func setupGrabberView() {
|
||||
grabberView.setStyle(.background)
|
||||
grabberView.layer.setCorner(radius: Constants.grabberHeight / 2)
|
||||
grabberView.setStyle(.grabber)
|
||||
iPadSpecific { [weak self] in
|
||||
self?.grabberView.isHidden = true
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue