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
Manos Chorianopoulos
2023-04-12 11:01:07 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e825ab15d772808f87a786578629c74732d51de1
e825ab15
1 parent
0ab1a189
redesign ShareViewController
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
22 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e825ab1
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
e825ab1
This diff is collapsed. Click to expand it.
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
View file @
e825ab1
...
...
@@ -57,22 +57,22 @@ import SwiftEventBus
// scrollView.layer.cornerRadius = 30
// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
let
image
=
UIImage
(
named
:
"top_border_line"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
!
var
aspectR
:
CGFloat
=
0.0
aspectR
=
image
.
size
.
width
/
image
.
size
.
height
topBorderLine
.
translatesAutoresizingMaskIntoConstraints
=
false
topBorderLine
.
image
=
image
topBorderLine
.
contentMode
=
.
scaleAspectFill
NSLayoutConstraint
.
activate
([
topBorderLine
.
topAnchor
.
constraint
(
equalTo
:
mainView
.
topAnchor
,
constant
:
0
),
topBorderLine
.
leadingAnchor
.
constraint
(
equalTo
:
mainView
.
leadingAnchor
,
constant
:
0
),
topBorderLine
.
trailingAnchor
.
constraint
(
equalTo
:
mainView
.
trailingAnchor
,
constant
:
0
),
topBorderLine
.
widthAnchor
.
constraint
(
equalToConstant
:
UIScreen
.
main
.
bounds
.
width
),
topBorderLine
.
heightAnchor
.
constraint
(
equalTo
:
topBorderLine
.
widthAnchor
,
multiplier
:
1
/
aspectR
)
])
//
let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
//
var aspectR: CGFloat = 0.0
//
//
aspectR = image.size.width/image.size.height
//
//
topBorderLine.translatesAutoresizingMaskIntoConstraints = false
//
topBorderLine.image = image
//
topBorderLine.contentMode = .scaleAspectFill
//
//
NSLayoutConstraint.activate([
//
topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
//
topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
//
topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
//
topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
//
topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
//
])
// COUPONSET: desc, img_preview, name, terms
// COUPON: coupon, expiration, discount, status
...
...
@@ -88,21 +88,22 @@ import SwiftEventBus
descriptionLabel
.
text
=
"Επίλεξε το κινητό από το οποίο θα γίνει η αποστολή και συμπλήρωσε το COSMOTE κινητό που θα λάβει το δώρο."
senderLabel
.
text
=
"Αποστολέας"
senderLabel
.
textColor
=
UIColor
(
red
:
0.52
,
green
:
0.52
,
blue
:
0.52
,
alpha
:
1.00
)
senderArrowImage
.
image
=
UIImage
(
named
:
"ic_down_dark_2"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
senderButton
.
addTarget
(
self
,
action
:
#selector(
self.numbersPopupTapped(_:)
)
,
for
:
.
touchUpInside
)
numberTextField
.
font
=
UIFont
(
name
:
"P
FSquareSansPro
-Regular"
,
size
:
16
)
numberTextField
.
textColor
=
UIColor
(
red
:
0.
25
,
green
:
0.33
,
blue
:
0.39
,
alpha
:
1.00
)
numberTextField
.
attributedPlaceholder
=
NSAttributedString
(
string
:
"Καταχώρηση τηλεφώνου"
,
attributes
:
[
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
(
red
:
0.
68
,
green
:
0.68
,
blue
:
0.68
,
alpha
:
1.00
)])
numberTextField
.
font
=
UIFont
(
name
:
"P
eridotPE
-Regular"
,
size
:
16
)
numberTextField
.
textColor
=
UIColor
(
red
:
0.
13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)
numberTextField
.
attributedPlaceholder
=
NSAttributedString
(
string
:
"Καταχώρηση τηλεφώνου"
,
attributes
:
[
NSAttributedString
.
Key
.
foregroundColor
:
UIColor
(
red
:
0.
52
,
green
:
0.52
,
blue
:
0.52
,
alpha
:
1.00
)])
numberTextField
.
keyboardType
=
.
asciiCapableNumberPad
numberTextField
.
addDoneButtonOnKeyboard
()
redeemButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"P
FSquareSansPro-Medium"
,
size
:
18
)
redeemButton
.
titleLabel
?
.
font
=
UIFont
(
name
:
"P
eridotPE-SemiBold"
,
size
:
17
)
redeemButton
.
setTitle
(
"Αποστολή με SMS"
,
for
:
.
normal
)
redeemButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
redeemButton
.
backgroundColor
=
UIColor
(
red
:
0.
47
,
green
:
0.75
,
blue
:
0.08
,
alpha
:
1.00
)
redeemButton
.
layer
.
cornerRadius
=
8
.0
redeemButton
.
backgroundColor
=
UIColor
(
red
:
0.
05
,
green
:
0.65
,
blue
:
0.00
,
alpha
:
1.00
)
redeemButton
.
layer
.
cornerRadius
=
16
.0
redeemButton
.
frame
=
CGRect
(
x
:
0.0
,
y
:
0.0
,
width
:
redeemButton
.
intrinsicContentSize
.
width
,
height
:
44
)
redeemButton
.
contentEdgeInsets
=
UIEdgeInsets
(
top
:
1
,
left
:
16
,
bottom
:
0
,
right
:
16
)
// Fix width for ipad
...
...
@@ -346,6 +347,7 @@ extension ShareViewController: NumbersPopupDelegate {
// Code for when option is selected
selectedNumber
=
option
senderLabel
.
text
=
option
senderLabel
.
textColor
=
UIColor
(
red
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)
}
}
...
...
Please
register
or
login
to post a comment