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
2022-05-23 13:34:19 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
31e88e5009ec1fa446595b9f981441ddd64dd1d8
31e88e50
1 parent
cfb65013
fix CouponsViewController
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/CouponsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
31e88e5
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/CouponsViewController.swift
View file @
31e88e5
...
...
@@ -15,7 +15,7 @@ import UIKit
var
coupons
:
Array
<
swiftApi
.
CouponItemModel
>
=
[]
override
func
viewDidLoad
()
{
public
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
getCouponsRequest
()
...
...
@@ -60,20 +60,20 @@ import UIKit
// MARK: - TableView
extension
CouponsViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
public
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
public
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
self
.
coupons
.
count
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
public
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
120.0
+
30.0
// return UITableViewAutomaticDimension
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
public
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"CouponsTableViewCellId"
,
for
:
indexPath
)
as!
CouponsTableViewCell
cell
.
configureCell
(
coupon
:
coupons
[
indexPath
.
row
])
...
...
@@ -81,10 +81,10 @@ extension CouponsViewController: UITableViewDelegate, UITableViewDataSource{
return
cell
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
public
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"CouponBarcodeViewController"
)
as
UI
ViewController
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"CouponBarcodeViewController"
)
as
!
CouponBarcode
ViewController
vc
.
coupon
=
coupons
[
indexPath
.
row
]
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
Please
register
or
login
to post a comment