Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
enzevalos_iphone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
enzevalos
enzevalos_iphone
Commits
da2801a3
Commit
da2801a3
authored
7 years ago
by
jakobsbode
Browse files
Options
Downloads
Patches
Plain Diff
UI should be working
parent
2426118e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
enzevalos_iphone/FolderListViewController.swift
+4
-3
4 additions, 3 deletions
enzevalos_iphone/FolderListViewController.swift
enzevalos_iphone/FolderViewController.swift
+13
-9
13 additions, 9 deletions
enzevalos_iphone/FolderViewController.swift
with
17 additions
and
12 deletions
enzevalos_iphone/FolderListViewController.swift
+
4
−
3
View file @
da2801a3
...
@@ -15,6 +15,7 @@ class FolderListViewController: UITableViewController {
...
@@ -15,6 +15,7 @@ class FolderListViewController: UITableViewController {
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
self
.
navigationItem
.
title
=
folder
.
name
self
.
navigationItem
.
title
=
folder
.
name
print
(
"Hallo"
)
}
}
override
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
override
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
...
@@ -28,7 +29,7 @@ class FolderListViewController: UITableViewController {
...
@@ -28,7 +29,7 @@ class FolderListViewController: UITableViewController {
override
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
override
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"folderListCell"
)
as!
FolderListCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"folderListCell"
)
as!
FolderListCell
let
mail
=
folder
.
mailsOfFolder
[
indexPath
.
row
]
let
mail
=
folder
.
mailsOfFolder
.
sorted
()
[
indexPath
.
row
]
cell
.
body
.
text
=
mail
.
body
cell
.
body
.
text
=
mail
.
body
if
let
contact
=
mail
.
from
.
contact
{
if
let
contact
=
mail
.
from
.
contact
{
...
@@ -38,7 +39,7 @@ class FolderListViewController: UITableViewController {
...
@@ -38,7 +39,7 @@ class FolderListViewController: UITableViewController {
cell
.
from
.
text
=
mail
.
from
.
mailAddress
cell
.
from
.
text
=
mail
.
from
.
mailAddress
}
}
cell
.
subject
.
text
=
mail
.
subject
cell
.
subject
.
text
=
mail
.
subject
cell
.
date
.
text
=
mail
.
date
.
description
cell
.
date
.
text
=
mail
.
timeString
if
mail
.
isSecure
{
if
mail
.
isSecure
{
cell
.
secureImageView
.
image
=
IconsStyleKit
.
imageOfLetter
cell
.
secureImageView
.
image
=
IconsStyleKit
.
imageOfLetter
...
@@ -113,7 +114,7 @@ class FolderListViewController: UITableViewController {
...
@@ -113,7 +114,7 @@ class FolderListViewController: UITableViewController {
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
override
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
performSegue
(
withIdentifier
:
"readFolderMailSegue"
,
sender
:
folder
.
mailsOfFolder
[
indexPath
.
row
])
performSegue
(
withIdentifier
:
"readFolderMailSegue"
,
sender
:
folder
.
mailsOfFolder
.
sorted
()
[
indexPath
.
row
])
}
}
override
func
prepare
(
for
segue
:
UIStoryboardSegue
,
sender
:
Any
?)
{
override
func
prepare
(
for
segue
:
UIStoryboardSegue
,
sender
:
Any
?)
{
...
...
This diff is collapsed.
Click to expand it.
enzevalos_iphone/FolderViewController.swift
+
13
−
9
View file @
da2801a3
...
@@ -33,6 +33,10 @@ class FolderViewController: UITableViewController {
...
@@ -33,6 +33,10 @@ class FolderViewController: UITableViewController {
}
}
}
}
}
}
override
func
viewDidAppear
(
_
animated
:
Bool
)
{
super
.
viewDidAppear
(
animated
)
tableView
.
reloadData
()
}
override
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
override
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
var
count
=
0
var
count
=
0
...
@@ -51,16 +55,16 @@ class FolderViewController: UITableViewController {
...
@@ -51,16 +55,16 @@ class FolderViewController: UITableViewController {
return
count
return
count
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
override
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
section
==
0
{
if
section
Type
(
IndexPath
.
init
(
row
:
0
,
section
:
section
))
==
.
inbox
{
return
1
return
1
}
}
if
section
==
2
{
if
section
Type
(
IndexPath
.
init
(
row
:
0
,
section
:
section
))
==
.
folders
{
return
7
return
folders
.
count
}
}
return
folders
.
count
<=
0
?
0
:
folders
.
count
-
1
return
getMails
()
.
count
}
}
override
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
override
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
2
{
if
sectionType
(
indexPath
)
==
.
mails
{
return
71
return
71
}
}
return
44
return
44
...
@@ -83,7 +87,7 @@ class FolderViewController: UITableViewController {
...
@@ -83,7 +87,7 @@ class FolderViewController: UITableViewController {
cell
.
from
.
text
=
mail
.
from
.
mailAddress
cell
.
from
.
text
=
mail
.
from
.
mailAddress
}
}
cell
.
subject
.
text
=
mail
.
subject
cell
.
subject
.
text
=
mail
.
subject
cell
.
date
.
text
=
mail
.
date
.
description
cell
.
date
.
text
=
mail
.
timeString
if
mail
.
isSecure
{
if
mail
.
isSecure
{
cell
.
secureImageView
.
image
=
IconsStyleKit
.
imageOfLetter
cell
.
secureImageView
.
image
=
IconsStyleKit
.
imageOfLetter
...
@@ -91,12 +95,12 @@ class FolderViewController: UITableViewController {
...
@@ -91,12 +95,12 @@ class FolderViewController: UITableViewController {
else
{
else
{
cell
.
secureImageView
.
image
=
IconsStyleKit
.
imageOfPostcard
cell
.
secureImageView
.
image
=
IconsStyleKit
.
imageOfPostcard
}
}
if
!
mail
.
flag
.
contains
(
MCOMessageFlag
.
seen
)
{
if
!
mail
.
isRead
{
cell
.
markImageView
.
image
=
"🔵"
.
image
()
cell
.
markImageView
.
image
=
"🔵"
.
image
()
cell
.
body
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
cell
.
body
.
font
.
pointSize
)
cell
.
body
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
cell
.
body
.
font
.
pointSize
)
cell
.
subject
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
cell
.
subject
.
font
.
pointSize
)
cell
.
subject
.
font
=
UIFont
.
boldSystemFont
(
ofSize
:
cell
.
subject
.
font
.
pointSize
)
}
}
if
mail
.
flag
.
contains
(
MCOMessageFlag
.
ans
wered
)
{
if
mail
.
isAn
wered
{
cell
.
replyImageView
.
image
=
"↩️"
.
image
()
cell
.
replyImageView
.
image
=
"↩️"
.
image
()
}
}
...
@@ -195,7 +199,7 @@ class FolderViewController: UITableViewController {
...
@@ -195,7 +199,7 @@ class FolderViewController: UITableViewController {
}
}
func
getMails
()
->
[
PersistentMail
]
{
func
getMails
()
->
[
PersistentMail
]
{
if
let
folder
=
self
.
presentedFolder
{
if
let
folder
=
self
.
presentedFolder
{
return
folder
.
mailsOfFolder
return
folder
.
mailsOfFolder
.
sorted
()
}
}
return
[]
return
[]
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment