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-26 17:07:51 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d65386f3853938e469387b2effa757cf401903c0
d65386f3
1 parent
85abefaf
redesign market history part 2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
201 additions
and
12 deletions
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/MarketHistoryViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/MarketSharingHistoryViewController.swift
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
d65386f
...
...
@@ -7,7 +7,7 @@
<key>
Pods-SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
0
</integer>
<integer>
1
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
d65386f
...
...
@@ -7,7 +7,7 @@
<key>
SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
1
</integer>
<integer>
0
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
d65386f
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
d65386f
This diff could not be displayed because it is too large.
SwiftWarplyFramework/SwiftWarplyFramework/MarketHistoryViewController.swift
View file @
d65386f
...
...
@@ -106,12 +106,14 @@ class MarketHistoryViewController: AnalysisChildViewController {
}
override
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
(
indexPath
.
section
==
0
)
{
return
hasMessage
?
(
items
.
count
>
0
?
380.0
:
480.0
)
:
280
}
return
140.0
// if (indexPath.section == 0) {
// return hasMessage ? (items.count > 0 ? 380.0 : 480.0) : 280
// }
//
// return 140.0
return
UITableView
.
automaticDimension
}
override
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
// header
...
...
@@ -147,4 +149,97 @@ class MarketHistoryViewController: AnalysisChildViewController {
self
.
tableView
.
reloadData
()
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
if
(
section
==
0
){
return
nil
}
else
if
(
section
==
1
)
{
if
(
self
.
items
.
count
>
0
)
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
frame
.
width
,
height
:
50
))
let
viewBorder
=
UIView
(
frame
:
CGRect
(
x
:
10
,
y
:
0
,
width
:
view
.
frame
.
width
-
20
,
height
:
view
.
frame
.
height
))
viewBorder
.
backgroundColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
viewBorder
.
layer
.
cornerRadius
=
16.5
viewBorder
.
layer
.
maskedCorners
=
[
.
layerMinXMinYCorner
,
.
layerMaxXMinYCorner
]
// Top left, bottom right corner radius
let
viewInner
=
UIView
(
frame
:
CGRect
(
x
:
1
,
y
:
1
,
width
:
viewBorder
.
frame
.
width
-
2
,
height
:
viewBorder
.
frame
.
height
-
1
))
viewInner
.
backgroundColor
=
.
white
viewInner
.
layer
.
cornerRadius
=
16.5
viewInner
.
layer
.
maskedCorners
=
[
.
layerMinXMinYCorner
,
.
layerMaxXMinYCorner
]
// Top left, bottom right corner radius
let
titleLabel
=
UILabel
(
frame
:
CGRect
(
x
:
20
,
y
:
20
,
width
:
viewInner
.
frame
.
width
-
40
,
height
:
20
))
titleLabel
.
font
=
UIFont
(
name
:
"BTCosmo-Bold"
,
size
:
20
)
titleLabel
.
textColor
=
UIColor
(
red
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)
titleLabel
.
text
=
"Αναλυτικά"
view
.
addSubview
(
viewBorder
)
viewBorder
.
addSubview
(
viewInner
)
viewInner
.
addSubview
(
titleLabel
)
return
view
}
else
{
return
nil
}
}
else
{
return
nil
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
if
(
section
==
0
)
{
return
0.0
}
else
if
(
section
==
1
)
{
if
(
self
.
items
.
count
>
0
)
{
return
50.0
}
else
{
return
0.0
}
}
else
{
return
0.0
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
// return CGFloat.leastNormalMagnitude
if
(
section
==
1
&&
self
.
items
.
count
>
0
)
{
return
20.0
}
else
{
return
0.0
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
if
(
section
==
1
)
{
if
(
self
.
items
.
count
>
0
)
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
frame
.
width
,
height
:
30
))
let
viewBorder
=
UIView
(
frame
:
CGRect
(
x
:
10
,
y
:
0
,
width
:
view
.
frame
.
width
-
20
,
height
:
view
.
frame
.
height
))
viewBorder
.
backgroundColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
viewBorder
.
layer
.
cornerRadius
=
16.5
viewBorder
.
layer
.
maskedCorners
=
[
.
layerMinXMaxYCorner
,
.
layerMaxXMaxYCorner
]
// bottom left, bottom right corner radius
let
viewInner
=
UIView
(
frame
:
CGRect
(
x
:
1
,
y
:
0
,
width
:
viewBorder
.
frame
.
width
-
2
,
height
:
viewBorder
.
frame
.
height
-
1
))
viewInner
.
backgroundColor
=
.
white
viewInner
.
layer
.
cornerRadius
=
16.5
viewInner
.
layer
.
maskedCorners
=
[
.
layerMinXMaxYCorner
,
.
layerMaxXMaxYCorner
]
// bottom left, bottom right corner radius
view
.
addSubview
(
viewBorder
)
viewBorder
.
addSubview
(
viewInner
)
return
view
}
else
{
return
nil
}
}
else
{
return
nil
}
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MarketSharingHistoryViewController.swift
View file @
d65386f
...
...
@@ -100,11 +100,12 @@ class MarketSharingHistoryViewController: AnalysisChildViewController {
}
override
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
(
indexPath
.
section
==
0
)
{
return
hasMessage
?
380.0
:
(
items
.
count
>
0
?
280
:
380
)
}
return
140.0
// if (indexPath.section == 0) {
// return hasMessage ? 380.0 : (items.count > 0 ? 280 : 380)
// }
//
// return 140.0
return
UITableView
.
automaticDimension
}
override
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
...
...
@@ -142,4 +143,97 @@ class MarketSharingHistoryViewController: AnalysisChildViewController {
self
.
tableView
.
reloadData
()
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
if
(
section
==
0
){
return
nil
}
else
if
(
section
==
1
)
{
if
(
self
.
items
.
count
>
0
)
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
frame
.
width
,
height
:
50
))
let
viewBorder
=
UIView
(
frame
:
CGRect
(
x
:
10
,
y
:
0
,
width
:
view
.
frame
.
width
-
20
,
height
:
view
.
frame
.
height
))
viewBorder
.
backgroundColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
viewBorder
.
layer
.
cornerRadius
=
16.5
viewBorder
.
layer
.
maskedCorners
=
[
.
layerMinXMinYCorner
,
.
layerMaxXMinYCorner
]
// Top left, bottom right corner radius
let
viewInner
=
UIView
(
frame
:
CGRect
(
x
:
1
,
y
:
1
,
width
:
viewBorder
.
frame
.
width
-
2
,
height
:
viewBorder
.
frame
.
height
-
1
))
viewInner
.
backgroundColor
=
.
white
viewInner
.
layer
.
cornerRadius
=
16.5
viewInner
.
layer
.
maskedCorners
=
[
.
layerMinXMinYCorner
,
.
layerMaxXMinYCorner
]
// Top left, bottom right corner radius
let
titleLabel
=
UILabel
(
frame
:
CGRect
(
x
:
20
,
y
:
20
,
width
:
viewInner
.
frame
.
width
-
40
,
height
:
20
))
titleLabel
.
font
=
UIFont
(
name
:
"BTCosmo-Bold"
,
size
:
20
)
titleLabel
.
textColor
=
UIColor
(
red
:
0.13
,
green
:
0.13
,
blue
:
0.13
,
alpha
:
1.00
)
titleLabel
.
text
=
"Αναλυτικά"
view
.
addSubview
(
viewBorder
)
viewBorder
.
addSubview
(
viewInner
)
viewInner
.
addSubview
(
titleLabel
)
return
view
}
else
{
return
nil
}
}
else
{
return
nil
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
if
(
section
==
0
)
{
return
0.0
}
else
if
(
section
==
1
)
{
if
(
self
.
items
.
count
>
0
)
{
return
50.0
}
else
{
return
0.0
}
}
else
{
return
0.0
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
// return CGFloat.leastNormalMagnitude
if
(
section
==
1
&&
self
.
items
.
count
>
0
)
{
return
20.0
}
else
{
return
0.0
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
if
(
section
==
1
)
{
if
(
self
.
items
.
count
>
0
)
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
tableView
.
frame
.
width
,
height
:
30
))
let
viewBorder
=
UIView
(
frame
:
CGRect
(
x
:
10
,
y
:
0
,
width
:
view
.
frame
.
width
-
20
,
height
:
view
.
frame
.
height
))
viewBorder
.
backgroundColor
=
UIColor
(
red
:
0.90
,
green
:
0.90
,
blue
:
0.90
,
alpha
:
1.00
)
viewBorder
.
layer
.
cornerRadius
=
16.5
viewBorder
.
layer
.
maskedCorners
=
[
.
layerMinXMaxYCorner
,
.
layerMaxXMaxYCorner
]
// bottom left, bottom right corner radius
let
viewInner
=
UIView
(
frame
:
CGRect
(
x
:
1
,
y
:
0
,
width
:
viewBorder
.
frame
.
width
-
2
,
height
:
viewBorder
.
frame
.
height
-
1
))
viewInner
.
backgroundColor
=
.
white
viewInner
.
layer
.
cornerRadius
=
16.5
viewInner
.
layer
.
maskedCorners
=
[
.
layerMinXMaxYCorner
,
.
layerMaxXMaxYCorner
]
// bottom left, bottom right corner radius
view
.
addSubview
(
viewBorder
)
viewBorder
.
addSubview
(
viewInner
)
return
view
}
else
{
return
nil
}
}
else
{
return
nil
}
}
}
...
...
Please
register
or
login
to post a comment