Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
c10cea72
Commit
c10cea72
authored
Jul 06, 2021
by
Dmitriy Stepanets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added medium widget to PromotionController
parent
a6eedde5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
1 deletions
+47
-1
1Weather-Icons.sketch
+0
-0
1Weather.xcodeproj/project.pbxproj
+4
-0
1Weather/UI/View controllers/WidgetPromotion/Views/PromotionMediumWidgetView.swift
+41
-0
1Weather/UI/View controllers/WidgetPromotion/Views/PromotionSmallWidgetView.swift
+1
-1
1Weather/UI/View controllers/WidgetPromotion/WidgetPromotionController.swift
+1
-0
No files found.
1Weather-Icons.sketch
View file @
c10cea72
No preview for this file type
1Weather.xcodeproj/project.pbxproj
View file @
c10cea72
...
@@ -154,6 +154,7 @@
...
@@ -154,6 +154,7 @@
CDAC9B8526319B0500AC1BF4
/* MapTimeControlItem.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDAC9B8426319B0500AC1BF4
/* MapTimeControlItem.swift */
;
};
CDAC9B8526319B0500AC1BF4
/* MapTimeControlItem.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDAC9B8426319B0500AC1BF4
/* MapTimeControlItem.swift */
;
};
CDAD97B1262042B2007FCFB1
/* MapButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDAD97B0262042B2007FCFB1
/* MapButton.swift */
;
};
CDAD97B1262042B2007FCFB1
/* MapButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDAD97B0262042B2007FCFB1
/* MapButton.swift */
;
};
CDAD97B426207D14007FCFB1
/* MapTimeControlView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDAD97B326207D14007FCFB1
/* MapTimeControlView.swift */
;
};
CDAD97B426207D14007FCFB1
/* MapTimeControlView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDAD97B326207D14007FCFB1
/* MapTimeControlView.swift */
;
};
CDC3F858269460E600AAE3BF
/* PromotionMediumWidgetView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDC3F857269460E600AAE3BF
/* PromotionMediumWidgetView.swift */
;
};
CDC6124F25E7964700188DA7
/* TodayDayTimesCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDC6124E25E7964700188DA7
/* TodayDayTimesCell.swift */
;
};
CDC6124F25E7964700188DA7
/* TodayDayTimesCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDC6124E25E7964700188DA7
/* TodayDayTimesCell.swift */
;
};
CDC6125325E79C8F00188DA7
/* DayTimeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDC6125225E79C8F00188DA7
/* DayTimeView.swift */
;
};
CDC6125325E79C8F00188DA7
/* DayTimeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDC6125225E79C8F00188DA7
/* DayTimeView.swift */
;
};
CDC6125725E7AB1A00188DA7
/* TodayAirQualityCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDC6125625E7AB1A00188DA7
/* TodayAirQualityCell.swift */
;
};
CDC6125725E7AB1A00188DA7
/* TodayAirQualityCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDC6125625E7AB1A00188DA7
/* TodayAirQualityCell.swift */
;
};
...
@@ -457,6 +458,7 @@
...
@@ -457,6 +458,7 @@
CDAC9B8426319B0500AC1BF4
/* MapTimeControlItem.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapTimeControlItem.swift
;
sourceTree
=
"<group>"
;
};
CDAC9B8426319B0500AC1BF4
/* MapTimeControlItem.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapTimeControlItem.swift
;
sourceTree
=
"<group>"
;
};
CDAD97B0262042B2007FCFB1
/* MapButton.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapButton.swift
;
sourceTree
=
"<group>"
;
};
CDAD97B0262042B2007FCFB1
/* MapButton.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapButton.swift
;
sourceTree
=
"<group>"
;
};
CDAD97B326207D14007FCFB1
/* MapTimeControlView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapTimeControlView.swift
;
sourceTree
=
"<group>"
;
};
CDAD97B326207D14007FCFB1
/* MapTimeControlView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapTimeControlView.swift
;
sourceTree
=
"<group>"
;
};
CDC3F857269460E600AAE3BF
/* PromotionMediumWidgetView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PromotionMediumWidgetView.swift
;
sourceTree
=
"<group>"
;
};
CDC6124E25E7964700188DA7
/* TodayDayTimesCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
TodayDayTimesCell.swift
;
sourceTree
=
"<group>"
;
};
CDC6124E25E7964700188DA7
/* TodayDayTimesCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
TodayDayTimesCell.swift
;
sourceTree
=
"<group>"
;
};
CDC6125225E79C8F00188DA7
/* DayTimeView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DayTimeView.swift
;
sourceTree
=
"<group>"
;
};
CDC6125225E79C8F00188DA7
/* DayTimeView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DayTimeView.swift
;
sourceTree
=
"<group>"
;
};
CDC6125625E7AB1A00188DA7
/* TodayAirQualityCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
TodayAirQualityCell.swift
;
sourceTree
=
"<group>"
;
};
CDC6125625E7AB1A00188DA7
/* TodayAirQualityCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
TodayAirQualityCell.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -997,6 +999,7 @@
...
@@ -997,6 +999,7 @@
children
=
(
children
=
(
CD857EA4268B36EA00B5E069
/* PromotionHeaderView.swift */
,
CD857EA4268B36EA00B5E069
/* PromotionHeaderView.swift */
,
CD857EA6268B45DD00B5E069
/* PromotionSmallWidgetView.swift */
,
CD857EA6268B45DD00B5E069
/* PromotionSmallWidgetView.swift */
,
CDC3F857269460E600AAE3BF
/* PromotionMediumWidgetView.swift */
,
);
);
path
=
Views
;
path
=
Views
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -1853,6 +1856,7 @@
...
@@ -1853,6 +1856,7 @@
CD251ED82603633800ED7A65
/* ForecastPrecipitationCell.swift in Sources */
,
CD251ED82603633800ED7A65
/* ForecastPrecipitationCell.swift in Sources */
,
CE13B816262480B3007CBD4D
/* NativeAdLoader.swift in Sources */
,
CE13B816262480B3007CBD4D
/* NativeAdLoader.swift in Sources */
,
CDF9BF8E26133D050037847D
/* LocationSearchCoordinator.swift in Sources */
,
CDF9BF8E26133D050037847D
/* LocationSearchCoordinator.swift in Sources */
,
CDC3F858269460E600AAE3BF
/* PromotionMediumWidgetView.swift in Sources */
,
CD7D318B268F36AF000D01FA
/* UIApplication+Version.swift in Sources */
,
CD7D318B268F36AF000D01FA
/* UIApplication+Version.swift in Sources */
,
CD86246125E662BC0097F3FB
/* SunUvLineView.swift in Sources */
,
CD86246125E662BC0097F3FB
/* SunUvLineView.swift in Sources */
,
CD32CE0B260C744A00235081
/* MenuCoordinator.swift in Sources */
,
CD32CE0B260C744A00235081
/* MenuCoordinator.swift in Sources */
,
...
...
1Weather/UI/View controllers/WidgetPromotion/Views/PromotionMediumWidgetView.swift
0 → 100644
View file @
c10cea72
//
// PromotionMediumWidgetView.swift
// 1Weather
//
// Created by Dmitry Stepanets on 06.07.2021.
//
import
UIKit
import
SwiftUI
import
OneWeatherUI
@available(iOS 14, *)
class
PromotionMediumWidgetView
:
UIView
{
//Private
private
let
widgetController
=
UIHostingController
(
rootView
:
MediumTemperatureWidgetView
(
widgetViewModel
:
nil
))
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
prepareWidgetView
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
}
//MARK:- Prepare
@available(iOS 14, *)
private
extension
PromotionMediumWidgetView
{
func
prepareWidgetView
()
{
widgetController
.
view
.
layer
.
cornerRadius
=
20
addSubview
(
widgetController
.
view
)
widgetController
.
view
.
snp
.
makeConstraints
{
make
in
make
.
height
.
equalTo
(
164
)
make
.
left
.
right
.
equalToSuperview
()
.
inset
(
18
)
make
.
top
.
equalToSuperview
()
.
inset
(
20
)
make
.
bottom
.
equalToSuperview
()
}
}
}
1Weather/UI/View controllers/WidgetPromotion/Views/PromotionSmallWidgetView.swift
View file @
c10cea72
...
@@ -59,7 +59,7 @@ class PromotionSmallWidgetView: UIView {
...
@@ -59,7 +59,7 @@ class PromotionSmallWidgetView: UIView {
@available(iOS 14, *)
@available(iOS 14, *)
private
extension
PromotionSmallWidgetView
{
private
extension
PromotionSmallWidgetView
{
func
prepareWidget
()
{
func
prepareWidget
()
{
widgetViewController
.
view
.
layer
.
cornerRadius
=
12
widgetViewController
.
view
.
layer
.
cornerRadius
=
20
addSubview
(
widgetViewController
.
view
)
addSubview
(
widgetViewController
.
view
)
widgetViewController
.
view
.
snp
.
makeConstraints
{
make
in
widgetViewController
.
view
.
snp
.
makeConstraints
{
make
in
...
...
1Weather/UI/View controllers/WidgetPromotion/WidgetPromotionController.swift
View file @
c10cea72
...
@@ -175,6 +175,7 @@ private extension WidgetPromotionController {
...
@@ -175,6 +175,7 @@ private extension WidgetPromotionController {
stackView
.
spacing
=
0
stackView
.
spacing
=
0
stackView
.
addArrangedSubview
(
PromotionHeaderView
())
stackView
.
addArrangedSubview
(
PromotionHeaderView
())
stackView
.
addArrangedSubview
(
PromotionSmallWidgetView
())
stackView
.
addArrangedSubview
(
PromotionSmallWidgetView
())
stackView
.
addArrangedSubview
(
PromotionMediumWidgetView
())
scrollView
.
addSubview
(
stackView
)
scrollView
.
addSubview
(
stackView
)
stackView
.
snp
.
makeConstraints
{
make
in
stackView
.
snp
.
makeConstraints
{
make
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment