Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Dimitris Togias
2022-09-14 07:20:02 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fea08b231486366e50883f18930c24de060dbcf7
fea08b23
1 parent
f94819bf
add custom button class
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
5 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/project.pbxproj
SwiftWarplyFramework/SwiftWarplyFramework/CSMButton.swift
SwiftWarplyFramework/SwiftWarplyFramework/MapsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/MapsViewController.xib
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/project.pbxproj
View file @
fea08b2
...
...
@@ -36,6 +36,7 @@
A080CFD628D170A20045A315 /* MapsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A080CFD428D170A20045A315 /* MapsViewController.swift */; };
A080CFD728D170A20045A315 /* MapsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A080CFD528D170A20045A315 /* MapsViewController.xib */; };
A080CFDA28D1889A0045A315 /* MerchantAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A080CFD928D1889A0045A315 /* MerchantAnnotation.swift */; };
A080CFDC28D18B780045A315 /* CSMButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A080CFDB28D18B780045A315 /* CSMButton.swift */; };
A09DBCAE2888BA8100DD50B0 /* SharingHistoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A09DBCAD2888BA8100DD50B0 /* SharingHistoryViewController.swift */; };
E6A77853282933340045BBA8 /* SwiftWarplyFramework.docc in Sources */ = {isa = PBXBuildFile; fileRef = E6A77852282933340045BBA8 /* SwiftWarplyFramework.docc */; };
E6A77854282933340045BBA8 /* SwiftWarplyFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = E6A77851282933340045BBA8 /* SwiftWarplyFramework.h */; settings = {ATTRIBUTES = (Public, ); }; };
...
...
@@ -193,6 +194,7 @@
A080CFD428D170A20045A315 /* MapsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapsViewController.swift; sourceTree = "<group>"; };
A080CFD528D170A20045A315 /* MapsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapsViewController.xib; sourceTree = "<group>"; };
A080CFD928D1889A0045A315 /* MerchantAnnotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MerchantAnnotation.swift; sourceTree = "<group>"; };
A080CFDB28D18B780045A315 /* CSMButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CSMButton.swift; sourceTree = "<group>"; };
A09DBCAD2888BA8100DD50B0 /* SharingHistoryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharingHistoryViewController.swift; sourceTree = "<group>"; };
A9B7BE01A4E812DE49866EF8 /* Pods-SwiftWarplyFramework.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWarplyFramework.debug.xcconfig"; path = "Target Support Files/Pods-SwiftWarplyFramework/Pods-SwiftWarplyFramework.debug.xcconfig"; sourceTree = "<group>"; };
B9EB8A451EF0C5AD75094EEE /* Pods-SwiftWarplyFramework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftWarplyFramework.release.xcconfig"; path = "Target Support Files/Pods-SwiftWarplyFramework/Pods-SwiftWarplyFramework.release.xcconfig"; sourceTree = "<group>"; };
...
...
@@ -410,6 +412,7 @@
A080CFD828D17F7A0045A315 /* controls */ = {
isa = PBXGroup;
children = (
A080CFDB28D18B780045A315 /* CSMButton.swift */,
);
name = controls;
sourceTree = "<group>";
...
...
@@ -933,6 +936,7 @@
E6A778EE282933E60045BBA8 /* WLNativeAdsTableMode.m in Sources */,
A07936732885E67400064122 /* AnalysisItem.swift in Sources */,
E6A778DF282933E60045BBA8 /* WarplyReactMethods.m in Sources */,
A080CFDC28D18B780045A315 /* CSMButton.swift in Sources */,
E6A77941282933E70045BBA8 /* AFURLRequestSerialization.m in Sources */,
E6A77915282933E60045BBA8 /* WLUtils.m in Sources */,
E6A77A36282BB4CB0045BBA8 /* MakeItAPresentViewController.swift in Sources */,
...
...
SwiftWarplyFramework/SwiftWarplyFramework/CSMButton.swift
0 → 100644
View file @
fea08b2
//
// CSMButton.swift
// SwiftWarplyFramework
//
// Created by Dimitris Togias on 14/9/22.
//
import
UIKit
@IBDesignable
class
CSMButton
:
UIButton
{
required
init
()
{
super
.
init
(
frame
:
.
zero
)
self
.
setup
()
}
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
self
.
setup
()
}
private
func
setup
()
{
self
.
titleLabel
?
.
font
=
UIFont
(
name
:
"PFSquareSansPro-Medium"
,
size
:
16
)
self
.
setTitleColor
(
.
white
,
for
:
.
normal
)
self
.
backgroundColor
=
UIColor
(
red
:
0.47
,
green
:
0.75
,
blue
:
0.08
,
alpha
:
1.00
)
self
.
layer
.
cornerRadius
=
12.0
}
}
SwiftWarplyFramework/SwiftWarplyFramework/MapsViewController.swift
View file @
fea08b2
...
...
@@ -19,7 +19,7 @@ class MapsViewController: UIViewController, MKMapViewDelegate {
@IBOutlet
private
var
hoursView
:
UILabel
!
@IBOutlet
private
var
phoneView
:
UILabel
!
@IBOutlet
private
var
addressView
:
UILabel
!
@IBOutlet
private
var
directionsButton
:
UI
Button
!
@IBOutlet
private
var
directionsButton
:
CSM
Button
!
@IBOutlet
private
var
infoTopConstraint
:
NSLayoutConstraint
!
// public
...
...
@@ -61,9 +61,9 @@ class MapsViewController: UIViewController, MKMapViewDelegate {
//directionsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
directionsButton
.
setTitle
(
"Οδηγίες"
,
for
:
.
normal
)
directionsButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
directionsButton
.
backgroundColor
=
UIColor
(
red
:
0.47
,
green
:
0.75
,
blue
:
0.08
,
alpha
:
1.00
)
directionsButton
.
layer
.
cornerRadius
=
12.0
//
directionsButton.setTitleColor(.white, for: .normal)
//
directionsButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
//
directionsButton.layer.cornerRadius = 12.0
}
// mvp
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MapsViewController.xib
View file @
fea08b2
...
...
@@ -114,7 +114,7 @@
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bw3-J9-wHr"
userLabel=
"Directions"
>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bw3-J9-wHr"
userLabel=
"Directions"
customClass=
"CSMButton"
customModule=
"SwiftWarplyFramework"
customModuleProvider=
"target"
>
<rect
key=
"frame"
x=
"317"
y=
"235"
width=
"67"
height=
"31"
/>
<state
key=
"normal"
title=
"Button"
/>
<buttonConfiguration
key=
"configuration"
style=
"plain"
title=
"Button"
/>
...
...
Please
register
or
login
to post a comment