Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RSS Reader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Johannes Grothe
RSS Reader
Commits
8e0e5b7c
Commit
8e0e5b7c
authored
4 years ago
by
Emircan Duman
Browse files
Options
Downloads
Patches
Plain Diff
#3
New feature clicking on cell link to ArticleView(), feed_provider_name added
parent
a0cf8c3a
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
RSS_Reader/ArticleList.swift
+5
-4
5 additions, 4 deletions
RSS_Reader/ArticleList.swift
RSS_Reader/ArticleListRow.swift
+37
-32
37 additions, 32 deletions
RSS_Reader/ArticleListRow.swift
with
42 additions
and
36 deletions
RSS_Reader/ArticleList.swift
+
5
−
4
View file @
8e0e5b7c
...
@@ -13,11 +13,12 @@ import SwiftUI
...
@@ -13,11 +13,12 @@ import SwiftUI
struct
ArticleList
:
View
{
struct
ArticleList
:
View
{
var
body
:
some
View
{
var
body
:
some
View
{
List
{
List
{
ForEach
(
model
.
article_data
){
article
in
ForEach
(
model
.
article_data
){
article
in
ArticleListRow
(
article
:
article
,
image
:
Image
(
"824cf0bb-20a4-4655-a50e-0e6ff7520d0f"
))
ArticleListRow
(
article
:
article
,
image
:
Image
(
"824cf0bb-20a4-4655-a50e-0e6ff7520d0f"
))
}
}
}
}
.
frame
(
alignment
:
/*@START_MENU_TOKEN@*/
.
center
/*@END_MENU_TOKEN@*/
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
RSS_Reader/ArticleListRow.swift
+
37
−
32
View file @
8e0e5b7c
...
@@ -12,44 +12,49 @@ import SwiftUI
...
@@ -12,44 +12,49 @@ import SwiftUI
*/
*/
struct
ArticleListRow
:
View
{
struct
ArticleListRow
:
View
{
var
article
:
ArticleData
var
article
:
ArticleData
var
image
:
Image
var
image
:
Image
var
body
:
some
View
{
var
body
:
some
View
{
NavigationLink
(
destination
:
ArticleView
()){
HStack
{
HStack
{
image
.
resizable
()
VStack
{
.
frame
(
width
:
130
,
height
:
115
)
Text
(
article
.
title
)
.
font
(
.
custom
(
"article_titel"
,
size
:
19
))
VStack
{
HStack
{
Text
(
article
.
title
)
Text
(
"feed_provider_name"
)
.
font
(
.
custom
(
"article_titel"
,
size
:
19
))
.
font
(
.
custom
(
"parent_feed_provider_name"
,
size
:
10
))
Text
(
article
.
date_to_string
())
Text
(
article
.
date_to_string
())
.
font
(
.
custom
(
"article_pub_date"
,
size
:
12
))
.
font
(
.
custom
(
"article_pub_date"
,
size
:
10
))
}
Text
(
article
.
description
)
Text
(
article
.
description
)
.
font
(
.
subheadline
)
.
font
(
.
subheadline
)
}
Spacer
()
//Image(article.image)
image
.
resizable
()
.
frame
(
width
:
130
,
height
:
115
)
}
}
//article.image
.
frame
(
alignment
:
.
center
)
Spacer
()
}
}
.
frame
(
width
:
370
,
height
:
120
,
alignment
:
.
center
)
}
}
}
struct
ArticleListRow_Previews
:
PreviewProvider
{
struct
ArticleListRow_Previews
:
PreviewProvider
{
static
var
previews
:
some
View
{
static
var
previews
:
some
View
{
let
img0
=
Image
(
"824cf0bb-20a4-4655-a50e-0e6ff7520d0f"
)
let
img
0
=
Image
(
"
824cf0bb-20a4-4655-a50e-0e6ff7520d0f
"
)
let
img
1
=
Image
(
"
c9f82579-efeb-4ed5-bf07-e10edafc3a4d
"
)
let
img1
=
Image
(
"c9f82579-efeb-4ed5-bf07-e10edafc3a4d"
)
Group
{
Group
{
ArticleListRow
(
article
:
model
.
article_data
[
0
],
image
:
img0
)
ArticleListRow
(
article
:
model
.
article_data
[
0
],
image
:
img
0
)
ArticleListRow
(
article
:
model
.
article_data
[
1
],
image
:
img
1
)
ArticleListRow
(
article
:
model
.
article_data
[
1
],
image
:
img1
)
}
}
}
}
}
}
}
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